The documentation states that the cancel method:
Cancels a change in the current sortable and reverts it to the state prior to when the current sort was started.
However when used dynamically after a sort has completed, it reverts the last change.
I am trying to use the cancel method to cancel active sorts when an event occurs that has to modify the underlying collection. The point is to asynchronously cancel any active sorts that the user may be performing before modifying the collection so that the collection array can stay in sync with the ui. The cancel method does achieve this, however in the case where there is no active sort being performed by the user, calling the cancel method will actually revert the last completed sort action even if that action has long since completed, basically like an Undo function.
At a minimum, if this is by design, the documentation is very unclear as to this functionality especially with the words "current sort". Does the "current sort" never end and it's context lives on forever?
If it is by design, it would be useful to have another method to stop (or cancel!) the current sort (as in the currently executing active sort being performed by the user). Better yet, change the "cancel" method to do this and only this, and add an "undo" method to revert the last completed change.
This is reproducible on the documentation page's example code.