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

onDragend not triggered when released outside of any group box #133

Closed
MaSobkowiak opened this issue Jan 21, 2025 · 4 comments
Closed

onDragend not triggered when released outside of any group box #133

MaSobkowiak opened this issue Jan 21, 2025 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@MaSobkowiak
Copy link

MaSobkowiak commented Jan 21, 2025

When transferring items between multiple groups, but relesed drag otside of any group, the onDragend event is not triggered, but the internal store is still updated with the transferred item.

Steps to Reproduce

  • Create multiple groups with drag and drop functionality.
  • Drag an item from one group to another.
  • Instead of dropping it into another group, move it so internaly it is transfered, but latter release the item outside any group box.

Expected Outcome

The onDragend event should trigger consistently whenever a drag operation is completed, regardless of whether the item is dropped into a group or released outside.

Other option, possibly simpler, is to add easy way to return to state before drag, when its dragged and dropped outside any group

Possibly it can also be a part of this #117

@sashamilenkovic
Copy link
Collaborator

@MaSobkowiak Hey there! Any chance you can put together a little reproduction of this? I'm having a hard time replicating at the latest version.

@MaSobkowiak
Copy link
Author

Hey, sorry for the late reply. A small reproduction is available at https://codesandbox.io/p/devbox/rvxhyw

Image

As you can see in the GIF above, when we move an item from Space 1 to Space 2 and then release it outside any space, the "onDragEnd" event is not triggered. In any other situation, both onDragStart and onDragEnd are triggered.

@sashamilenkovic sashamilenkovic self-assigned this Feb 4, 2025
@sashamilenkovic sashamilenkovic added the bug Something isn't working label Feb 10, 2025
sashamilenkovic added a commit that referenced this issue Feb 11, 2025
@sashamilenkovic
Copy link
Collaborator

@MaSobkowiak This should be resolved at v0.3.4. Let me know if you have any questions/issues.

@MaSobkowiak
Copy link
Author

Thanks for quick fix, I did small test on version v0.3.4 and it seems to be working fine now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants