-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
On Removed never called #607
Comments
Same problem here. |
You can bind a jquery remove event on the child elements. e.g $(".grid-stack-item").on("remove",function(){ something like that should do the trick. If you are referencing it to a object just assign a id on each element. Which you can do with the addWidget function (last param), and then use jquery's attr function to compare. |
I did a nasty workaround, tweaked onEndMoving() in the gridstack.js
and then
That way it works on dynamic items |
@MarkoIvanetic It's working,thank you ~~~~,so that i can get the data-gs-id and do my operating |
@MarkoIvanetic Nice solution, i allowed me to find the problem. You don't need to create a new trigger. you just need to use the existing one like this.
and then in your code do this This fixes the problem without adding a new trigger. I'm going to create a pull request for this and hopefully it will be included in the next version. The fact is that i want to use this trough a cdn and don't want to host the custom .js locally. But for now it will do. |
@RobertoBiundo good job man. without creating new trigger. |
Still now that it's modified i cant use it with bower. |
Thanks this is a better solution :). |
Just to let you guys know that i already created a pull request and hopefully this will be included soon and @MarkoIvanetic can start using it with bower. |
Fixed in develop branch. Will go live in |
I have this
that initialises the grid the way i want it...fine...
I have an div with a class .remove-area
the drag and drop to remove procedure is working, if i drag a widget it gets removed, but...
if i do this (as described in the docs)
this function never gets called.
Any ideas?
The text was updated successfully, but these errors were encountered: