vue.draggable.next icon indicating copy to clipboard operation
vue.draggable.next copied to clipboard

[bug] draging list creates item unexpectly on live demos

Open SimonLeeee opened this issue 4 years ago • 4 comments

Please check the https://sortablejs.github.io/vue.draggable.next/#/clone First step, move the left list item John to the bottom of right list. Second step, do the first step again. Finally, in right list, move the first item to the bottom, then you will see right list create an item unexpected.

SimonLeeee avatar Jan 06 '22 03:01 SimonLeeee

You can refer to cust clone demo, use clone method

AIDeepx avatar Jan 12 '22 02:01 AIDeepx

You can refer to cust clone demo, use clone method

Yeah it can be an alternate way, but problem still remains, the live demos need a fix

SimonLeeee avatar Jan 12 '22 12:01 SimonLeeee

Yeah, I'm having this issue on my website. It's not just with cloning lists either but simple lists as well. The issue does appear to be visual because the actual data list remains the same so the component is generating too many dom elements for some reason. Looking in too it.

Zedicius avatar Jan 27 '22 08:01 Zedicius

Ah, found it. It's because the item-key attribute in the draggable component refers too 'name'. If you put two 'Johns' in the list, the item-key is no longer unique and the list gets messed up. As long as you make sure that the item-key attribute is a unique value things seem to work fine.

Zedicius avatar Jan 27 '22 08:01 Zedicius