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

Identical cloned element gets moved twice in view

Open Marlaqk opened this issue 6 years ago • 1 comments

When you drag the same item twice to the normal list and then drag the first "Element 11" back to the cloned list both elements appear in the cloned list. But the array's below show that the state of the ui is broken.

clonedicons

angular-sortablejs-demo

I have the same error in my own example with the same setup with a cloneable list.

Marlaqk avatar Feb 12 '19 19:02 Marlaqk

It has something to do with cloning by reference. For my usecase overriding the clone function worked.

myCloneImplementation = (item) => { return {...item} }

Marlaqk avatar Feb 13 '19 07:02 Marlaqk