mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(ionReorderButton): fix onReorder not triggering angular digest
This commit is contained in:
7
js/angular/directive/list.js
vendored
7
js/angular/directive/list.js
vendored
@@ -250,7 +250,12 @@ function($animate, $timeout) {
|
||||
onReorder: function(el, oldIndex, newIndex) {
|
||||
var itemScope = jqLite(el).scope();
|
||||
if (itemScope && itemScope.$onReorder) {
|
||||
itemScope.$onReorder(oldIndex, newIndex);
|
||||
//Make sure onReorder is called in apply cycle,
|
||||
//but also make sure it has no conflicts by doing
|
||||
//$evalAsync
|
||||
itemScope.$evalAsync(function() {
|
||||
itemScope.$onReorder(oldIndex, newIndex);
|
||||
});
|
||||
}
|
||||
},
|
||||
canSwipe: function() {
|
||||
|
||||
Reference in New Issue
Block a user