I'm using Vue.Draggable: https://github.com/SortableJS/Vue.Draggable
Fiddle: https://jsfiddle.net/o5pcLhhj/
I have two lists setup and the ability to drag between them. I've added an onAdd event to the second list so I can detect when something gets added to that list:
onAdd: function(evt) {
console.log(evt.item);
}
Now if I drag "John" or "Joao" to the 2nd list, the event is not correctly picking up the item that was dragged in. It seems to be off by one index. If I drag "Jean" in, it correctly picks up this item.
What am I doing wrong here?!
Fiddle: https://jsfiddle.net/o5pcLhhj/
Thank you in advance!!
Use a different key. Indexes are not very good keys.
Updated fiddle.
Here I'm using the name, but the ideal would be some unique
id
property of each list item.etc, and