-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 properly clone between Draggable #21
Comments
Hello @lucadegasperi , could you provide a fiddle showing the current behaviour and explaining what you would expect? Thanks. |
Whoa, quick answer: Here's the fiddle: https://jsfiddle.net/32f7yu7c/ Try dragging one item from the list above to the list below and then click on the item in the list below. It will update the item in the list above as well (thus it's not a real cloning) |
I understand what you are trying to do and currently vue.draggable is designed to use the same object when the clone option is used. |
Would be awesome as I'm stuck with this problem. Even without a hook, where should I look for to properly clone the object? |
You should take a look at |
Guess I can wait that long :) Thanks! |
Added the clone props to override the current cloning behaviour. See readme for documentation of this new function and this example: https://jsfiddle.net/dede89/dcvLufju/ |
这个问题困扰了老子很久很久 百度搜索搜不到 换了谷歌搜索 一下子就出来了 牛批牛批 感谢作者! |
I found another pretty good example of "clone" https://codepen.io/getreworked/pen/zMzzQR?editors=1010 |
Hello, I've got 2 draggable components, from the first one objects can be cloned into the second draggable component. The problem Arises when cloning two object of the same type because they become interlinked (and changing data on one changes the data on the other) Is there a way to do a deep clone of one item?
The text was updated successfully, but these errors were encountered: