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

Some items become undraggable after dragging between groups #135

Open
BradDuns opened this issue Feb 3, 2025 · 0 comments
Open

Some items become undraggable after dragging between groups #135

BradDuns opened this issue Feb 3, 2025 · 0 comments

Comments

@BradDuns
Copy link

BradDuns commented Feb 3, 2025

Issue

I've got nested draggable elements that sometimes stop being draggable.
There is an array of groups, those groups can be reordered.
Within each group there is an array of members, which can be reordered or moved between groups. The app is in vue, it syncs with firestore via a pinia store.
My app is using 0.3.1 because a few things stopped working when I tried to upgrade so I had to roll back.
It mostly works but sometimes it just stops.

A repeatable reproduction using v0.3.3 here: https://codesandbox.io/p/devbox/dnd-nested-v0-3-3-f2wkj5
This seems to reliably break draggable elements that are in a group after a group thats an empty array.

Setup

Since this is shared live data from firestore, if it doesn't look like below you can reset the state with the Reset Firestore button

[ { "name": "Group 1", "members": [ "Jack", "Jill" ] },
  { "name": "Group 2", "members": [ "Jane", "Joe" ] },
  { "name": "Group 3", "members": [ "James" ] },
  { "name": "Group 4", "members": [ "Jake" ] }, ]

Steps to Reproduce

• Drag Joe from group 2 to group 4 - works
• Drag James from Group 3 to group 4 - works
• Now all elements in group 4 are no longer draggable
• Drag group 4 above group 3 and they work again

Similarly if you empty group 2, groups 3 & 4 are no longer draggable. Drag group 2 below groups 3 & 4 or drag something from group 1 into group 2 and everything works again.

Empty arrays isn't the only thing that seems to break it but the above is repeatable so I wonder if it would solve my other upgrade & intermittent 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

No branches or pull requests

1 participant