Skip to content

Conversation

fxxjdedd
Copy link

If it's just a simple click, don't modify the DOM.

@STRML
Copy link
Collaborator

STRML commented Apr 10, 2020

This will add the styles multiple times, I doubt that is desired.

@fxxjdedd
Copy link
Author

fxxjdedd commented Apr 11, 2020

This will add the styles multiple times, I doubt that is desired.

This is indeed a problem, Maybe we need an extra if in handledrag.

However, it is necessary not to add styles when clicking. Because in actual development, we do have two different types of logic: click and drag. When there are too many heavy GridItems, click can cause some performance problems

@fxxjdedd
Copy link
Author

@STRML
Hello,
I found that addClassName already has logic to avoid duplicate classes. However, I can add another hasUserSelectStyles judgment if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants