You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by hipstersmoothie October 27, 2023
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
// If the dragged element is removed from the DOM via onDrop, onDragEnd won't fire: https://bugzilla.mozilla.org/show_bug.cgi?id=460801
// In this case, we need to manually call onDragEnd on cleanup
```</div>