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

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

Open
celsomtrindade opened this issue Apr 4, 2017 · 8 comments

Comments

@celsomtrindade
Copy link

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.

@samjacobclift
Copy link
Contributor

samjacobclift commented Apr 10, 2017

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

@samjacobclift
Copy link
Contributor

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

@celsomtrindade
Copy link
Author

celsomtrindade commented Apr 10, 2017

@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.

@samjacobclift
Copy link
Contributor

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

@celsomtrindade
Copy link
Author

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.

@ZiQiangWang
Copy link

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

@beazergood
Copy link

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!

serjum added a commit to serjum/angular-legacy-sortablejs that referenced this issue Jul 8, 2017
serjum added a commit to serjum/angular-legacy-sortablejs that referenced this issue Jul 10, 2017
@nguyentrangdong
Copy link

You are best, beazergood!!!

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

5 participants