I'm trying to make the sortable list two-way bound
Here's an example of HTML and array elements in vue 1
As you can see it works as expected.
Here's the same example ported to vue 2
it looks broken!
I think it's because the way vue 2 handles dom diffing? Or is it a bug? Is there a a way to work around it?
You could add a unique key for each list item, take a look at list rendering doc
I updated the fiddle here https://jsfiddle.net/defcc/9ne1m5js/2/
It's because sortable works with the dom in place and Vue needs a hint to keep track of dom elements
Most helpful comment
You could add a unique key for each list item, take a look at list rendering doc
I updated the fiddle here https://jsfiddle.net/defcc/9ne1m5js/2/