Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to edit the source item when cloning to another list #107

Open
ralfcarneborn opened this issue Mar 25, 2024 · 1 comment
Open

How to edit the source item when cloning to another list #107

ralfcarneborn opened this issue Mar 25, 2024 · 1 comment

Comments

@ralfcarneborn
Copy link

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?

@pvpmartins
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants