I've been banging my head against the wall trying to figure this out. I found an example of pretty much exactly what I'm trying to do via the Sortable.js library repo here but I haven't been able to implement it using Vue.Draggable.
My theory of how to do it is add a <draggable/>
element that is in the same group
as the rest of the elements and listen for an @add
event on it, then remove that dragged element from its list.
One gotcha (maybe) is I'm trying to designate a "trash" button as the removal region, and if it references the same draggable group
, that dragged element gets appended to the button group and throws off the whole UI. So, a really important thing as that there's some sort of user feedback (e.g. trash icon turns red when hovering with drag element), but the dragged element shouldn't get inserted to the button group.
Initial Drag State
Intended Delete Action
Thanks in advance!