Open whollaus opened 4 years ago
Have you put a getter on it? That MAY be the issue. Otherwise, this is a bug according to the docs:
/**
* Save the order of elements. Called onEnd (when the item is dropped).
* @param {Sortable} sortable
*/
@waynevanson This isn't a bug, he's asking if it could be called only if the list is changed onEnd.
@whollaus For now you can just compare the sortable.toArray()
before and after the save event is called, and only do your call if there is a change.
I see no reason why the save function should be called if nothing has changed, so I'm marking this as an enhancement
@owen-m1
I see no reason why the save function should be called if nothing has changed, so I'm marking this as an enhancement
Sorry, but I have the problem, that I want to insert element and see changes only drop not on dragover. Is it not the same?
Problem:
Is it possible to fire the event only if something has really changed? Currently my Ajax call is always called, even if you move the elements only a few millimeters. But without really changing anything.
Thanks!