This repository was archived by the owner on Sep 8, 2020. It is now read-only.
This repository was archived by the owner on Sep 8, 2020. It is now read-only.
Fix implementation of callbacks (update/stop) #27
Closed
Description
This fiddle demonstrates some weird behavior with the callbacks provided to the sortable-options object.
- The $scope.model inside the update callback is not the new one, but the old one.
- The $scope.model inside the stop callback is the new one, but stop occurs after apply()
The only solution that I came up is: define a callback for stop, process the new data and call $scope.apply().
I think that the point of a callback, is to provide a way to respond to an event and
possibly process any changes that happened.
Those model-changes/new-model-state are not provided in any way in the current implementation.
(Obviously, nobody should have to call apply())
Metadata
Metadata
Assignees
Labels
No labels