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
complete is called after each click and not only after a drop to another position #16
Comments
Yes it is called every time after the drop. Not only if the position was changed. But I think that there is a way to check if the position is the same right in complete callback. Or you will do some redundant persists. Is it problem? |
I have an issue also with this. I want to trigger an ajax call after complete drop not after every click on element which is considered as complete move. |
Try to save position or parent el. or both by onDragStart callback and check it in complete callback. If it is the same position don't trigger ajax. |
May be it could be the implemented in plugin as onChange callback. |
Yes, maybe you should change the wording. Rename "Complete" to "Change" and implement new callback "Update" which will be called after user drops element. |
Why update if nothing was updated? |
Hm... Yes, it makes sense. Then leave Complete callback and implement Change callback as you wrote above. 👍 |
Ok onChange callback was implemented. |
Oh, great, it was quick 😄 |
I would like to persist the menu in case the position was changed after a drop.
I implemented this in the 'complete' callback but I see that this callback is also called after just clicking a menu-item and not only after a drop to another position as expected.
The text was updated successfully, but these errors were encountered: