sortablejs-vue3 icon indicating copy to clipboard operation
sortablejs-vue3 copied to clipboard

How to edit the source item when cloning to another list

Open ralfcarneborn opened this issue 1 year ago • 1 comments

Hi i have this codesandbox: https://codesandbox.io/p/devbox/sortablejs-clone-forked-yqpqlk

When i drag an item from the source to the target, and then want to edit the source item, it always just updates the cloned item.

This is a simplified example, in my real app i am dragging an item from between two lists like this but on drop i remove the cloned item and manually add another type of component (dragging a text/image component, on drop it turns into a video).

After dropping I simply want to be able to update the original dragged item via the databinding, but any change only affects the cloned item (that is now removed).

How do i solve this?

ralfcarneborn avatar Mar 25 '24 08:03 ralfcarneborn

Man, I am currently looking to create a "deep copy" of the element when cloning... its been really tough to do it, But i will let you know if I made any progress.

pvpmartins avatar Apr 14 '24 15:04 pvpmartins