angular-legacy-sortablejs icon indicating copy to clipboard operation
angular-legacy-sortablejs copied to clipboard

When moving elements on nested listing, the element gets cloned on the list it moved from

Open celsomtrindade opened this issue 8 years ago • 8 comments
trafficstars

When moving from one nested listing to another, the element move but creates a clone on the older list.

I've made this plunker to recreate the problem.

If you move, for example, one "Shirt" from the "Shirt list" into a "Shoes list", the shirt will move, but the same shirt will be recreated on the "Shirt list" again, cloning the element.

celsomtrindade avatar Apr 04 '17 16:04 celsomtrindade

Is this a sortable bug or an angular sortable specific one?

samjacobclift avatar Apr 10 '17 13:04 samjacobclift

I'm working on a simple e2e test suite so if I can get that done I can use this to write a test case if its a sortable issue

samjacobclift avatar Apr 10 '17 13:04 samjacobclift

@samjacobclift I don't know, but it seems to be sortable issue, since it's happening only in a nested list and only when moving from one to another. If the we move in the same list, just to reorder the list, nothing happens. In the same example, if you drag the whole category list, it will move and doesn't clone. The problem only happen within the products list.

But like I said, I'm not sure.

celsomtrindade avatar Apr 10 '17 14:04 celsomtrindade

ah nest isnt officially supported by sortableJS I believe. It maybe worth raising this as an issue in the main repo

samjacobclift avatar Apr 10 '17 14:04 samjacobclift

But did you saw the plunker i did? Because the sorting does happen and work. The problem is when you want to remove an item from one nested listing and add to another nested listing.

It also does remove and move. But it creates a clone on the list it got removed from, duplicating the element, leaving one on the new nested listing and one in the old nested listing.

celsomtrindade avatar Apr 10 '17 14:04 celsomtrindade

I have the same problem, have you figure it out????

ZiQiangWang avatar Apr 28 '17 10:04 ZiQiangWang

I too appear to have this same issue. Dragging between lists the dragged item reappears: http://jsbin.com/yuvucim/edit?html,js,output

Would love to find out why!

beazergood avatar May 08 '17 18:05 beazergood

You are best, beazergood!!!

nguyentrangdong avatar Feb 14 '19 03:02 nguyentrangdong