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: set activeDrag in the state onDragStart #1923

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

tantawyk
Copy link
Contributor

this fixes a problem where clicking on the drag handle triggers onDragStart and doesn't trigger onDragStop as the activeDrag was being set only onDrag and not onDragStart as well. another solution would be to remove the check for activeDrag in the onDragStop function.

#1745

this fixes a problem where clicking on the drag handle triggers onDragStart and doesn't trigger onDragStop as the activeDrag was being set only onDrag and not onDragStart as well.
another solution would be to remove the check for activeDrag in the onDragStop function.
@tantawyk
Copy link
Contributor Author

@STRML please let me know if this is not wanted, or if it needs some tests

@STRML
Copy link
Collaborator

STRML commented Aug 29, 2023

This was years ago, so I'm trying to figure out the intent - I think it was that it didn't make much sense to show the placeholder only on onDragStart in case it was a simple click with no movement.

It is definitely confusing that onDragStart can fire with no onDragStop, so perhaps it is better to fix that issue.

@STRML STRML merged commit 57bba6b into react-grid-layout:master Oct 31, 2023
@STRML
Copy link
Collaborator

STRML commented Oct 31, 2023

Went ahead and merged this to try to get on top of React 18 issues.

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