Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(user-select): move addUserSelectStyles from handleDragStart to ha… #447

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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.

None yet

2 participants