You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 8, 2020. It is now read-only.
Copy file name to clipboardexpand all lines: README.md
+7-5
Original file line number
Diff line number
Diff line change
@@ -78,16 +78,18 @@ $scope.sortableOptions = {
78
78
};
79
79
```
80
80
81
-
**Note:**`update` occurs before any model/scope changes but after the DOM position has been updated.
81
+
**Notes:**
82
+
*`update` is the appropriate place to cancel a sorting, since it occurs before any model/scope changes but after the DOM position has been updated.
82
83
So `ui.item.scope` and the directive's `ng-model`, are equal to the scope before the drag start.
84
+
* To [cancel a sorting between connected lists](https://github.com/angular-ui/ui-sortable/issues/107#issuecomment-33633638), `cancel` should be called inside the `update` callback of the originating list.
0 commit comments