Browse Source

Merge pull request #871 from christianp/ko-deferred-tasks-fix

knockout: run deferred tasks early
pull/883/head
Lebedev Konstantin 9 years ago committed by GitHub
parent
commit
cedd070ade
  1. 2
      knockout-sortable.js

2
knockout-sortable.js

@ -157,6 +157,8 @@
// Force knockout to update
from.valueHasMutated();
}
// Force deferred tasks to run now, registering the removal
ko.tasks.runEarly();
// Insert the item on its new position
to().splice(newIndex, 0, itemVM);
// Make sure to tell knockout that we've modified the actual array.

Loading…
Cancel
Save