From 569bf6177121a6fc34184f794ee99d78c12e4bed Mon Sep 17 00:00:00 2001 From: carlosagsmendes Date: Fri, 17 Jun 2016 18:56:38 +0100 Subject: [PATCH] If using ko.options.deferUpdates forceUpdates afterMove --- src/knockout-sortable.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/knockout-sortable.js b/src/knockout-sortable.js index b57acf4..24ab049 100644 --- a/src/knockout-sortable.js +++ b/src/knockout-sortable.js @@ -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); @@ -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);