Skip to content

Commit

Permalink
If using ko.options.deferUpdates forceUpdates afterMove
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosagsmendes authored and rniemeyer committed Jun 17, 2016
1 parent b3ee77d commit 569bf61
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/knockout-sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,11 @@
if (ko.processAllDeferredBindingUpdates) {
ko.processAllDeferredBindingUpdates();
}

//if using deferred updates on knockout 3.4, force updates
if(ko.options.deferUpdates) {
ko.tasks.runEarly();
}
}

targetParent.splice(targetIndex, 0, item);
Expand All @@ -288,6 +293,11 @@
if (ko.processAllDeferredBindingUpdates) {
ko.processAllDeferredBindingUpdates();
}

//if using deferred updates on knockout 3.4, force updates
if(ko.options.deferUpdates) {
ko.tasks.runEarly();
}

targetParent.splice(targetIndex, 0, item);

Expand Down

0 comments on commit 569bf61

Please sign in to comment.