The plugin is awesome, but from my point of view has few issues because it's more DOM-driven than data-driven.
Example:
if I move an item from a list with group name 'foo' to a list group name 'bar', I'm expecting to have back an object with:
and not a HTML nodes
Without this type of informations it is really hard to mutate local states or vuex store states.
Please correct me if I am wrong and give me some suggestions on how to handle this kind of behaviors
Thanks for your time
Check change event
@David-Desmaisons yes I did it already: it's where I have these DOM elements back
There should be a way to add names to draggable components ( without any relations with the group name ) and when I move an item between multiple lists, I retrieve the item that I moved, the name of its previous list and its new list.
is this possible?
Well you do not have DOM node on change event only view model information
Could you tell what is missing on the event change?
From the Readme:
change event
change event is triggered when list prop is not null and the corresponding array is altered due to drag-and-drop operation.
This event is called with one argument containing one of the following properties:added: contains information of an element added to the array
newIndex: the index of the added element
element: the added element
removed: contains information of an element removed from to the array
oldIndex: the index of the element before remove
element: the removed element
moved: contains information of an element moved within the array
newIndex: the current index of the moved element
oldIndex: the old index of the moved element
element: the moved element
would be nice, if the list has a name and your dealing with multiple lists, to know from which list the item comes from and in which list is added now
@MatteoGabriele you can use the clone prop to do such a think.
Most helpful comment
would be nice, if the list has a name and your dealing with multiple lists, to know from which list the item comes from and in which list is added now