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 can I detect when an item is dragged to a different group? #32

Closed
muchacho-diesel opened this issue Nov 25, 2016 · 4 comments
Closed
Labels

Comments

@muchacho-diesel
Copy link

muchacho-diesel commented Nov 25, 2016

Is it possible to track an item when it's dragged to a different group with the new group id where the item is inserted? It's the same idea like you can track the: oldIndex & newIndex, but then for swapping between groups.

example: https://jsfiddle.net/4tp3hz87/13/

@David-Desmaisons
Copy link
Member

@muchacho-diesel ,
First, nested draggable element are not currently supported. See issue#30. Resolution depends depend on mifgration on new version of Sortable. Current by-pass is to use Sortable version 1.5.0-rc1

Second, you can use the add event to tack new lement entering in a group:
https://jsfiddle.net/dede89/rrf3yqg7/

@muchacho-diesel
Copy link
Author

muchacho-diesel commented Nov 25, 2016

@David-Desmaisons Thank you for the quick response, but the added method is'nt triggerd at all when I swap tasks. When I inspect it in the console I see only strange javascript code, is that supposed to be?

capture

@David-Desmaisons
Copy link
Member

Can you explain the scenario which is not working If it the nested frag it is link to issue #30

@muchacho-diesel
Copy link
Author

It's working now, I changed :onAdd="added" to @add="added". Thank you for your help.

https://jsfiddle.net/rrf3yqg7/2/

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

No branches or pull requests

2 participants