Virtualized Draggable ListBox #5320
Unanswered
hipstersmoothie
asked this question in
Q&A
Replies: 1 comment 7 replies
-
Thanks for bringing this up, looks to be a bug on our end. Looks like we aren't properly persisting the dragged keys in our Virtualizer, the key being persisted is actually changing to match the key that the drop is currently hovering over and thus the original item gets removed from the DOM as you noticed. Seems to be some difference between the docs example and our storybook example as well, the storybook example doesn't cancel the drop on when dragend is triggered by the item unmounting but the docs example does: https://codesandbox.io/s/vigorous-sun-v5v43v?file=/src/App.js. I'll convert this to an issue. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a virtualized draggable listbox and it mostly work.
One thing that doesn't is dragging things from the start of the list to the end of the list. If the dragged item gets unmounted while the drag is happening, the useDraggableItem calls it onDragEnd and the drag operation won't work.
Is there any guidance on this?
Looking at the code it looks like useDrag doesn't really depend on the original element still being mounted.
The issue lies in the code below
Beta Was this translation helpful? Give feedback.
All reactions