SortableJS / vue.draggable.next

Vue 3 compatible drag-and-drop component based on Sortable.js
https://sortablejs.github.io/vue.draggable.next/#/simple
MIT License
3.91k stars 531 forks source link

when i use two list, the first list is cloned to the second list, can i change the clone item in onChange function of the second list? #42

Open AHRL opened 3 years ago

AHRL commented 3 years ago

i do some change in onChange function.

onChange(event) {
    const element = event.added.element;
    // do some change for element
    event.added.element = element;
}

but data of the second list is not changed.

imlinhanchao commented 1 year ago

I think you can use custom clone, like this: https://github.com/SortableJS/vue.draggable.next/blob/master/example/components/custom-clone.vue