dnd-kit
dnd-kit copied to clipboard
Question about dragging multiple items at once
Just checking out dnd kit, and it looks great, but I want to check if my intended use case is actually possible before diving in...
I want to make a UI very similar to the multiple containers / many items example... But I also want it to be possible to select multiple items at once, across multiple containers, and drag all the selected items together as a bunch.
The user would select multiple items at once by cmd+clicking on them, which would mark them as 'selected'. Then, initiating a drag (e.g. with a mousedown followed by 3px movement, or whatever) on any selected item would cause the following to happen: all the other selected items (even those in different containers) would instantly move to be adjacent to the target item (i.e. initially in the same container, just underneath the target item) so you can proceed to drag them all as a bunch.
Would it be possible to achieve that interaction with dnd kit?
#588 theres ready example here