Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit 2f14e5b

Browse files
David limkysDavid limkys
David limkys
authored and
David limkys
committed
Fixed bug where on-remove event fired before the selected array was updated.
1 parent aa13ee3 commit 2f14e5b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/select.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -495,9 +495,12 @@
495495
ctrl.activeMatchIndex = -1;
496496
ctrl.sizeSearchInput();
497497

498-
ctrl.onRemoveCallback($scope, {
499-
$item: removedChoice,
500-
$model: ctrl.parserResult.modelMapper($scope, locals)
498+
// Give some time for scope propagation.
499+
$timeout(function(){
500+
ctrl.onRemoveCallback($scope, {
501+
$item: removedChoice,
502+
$model: ctrl.parserResult.modelMapper($scope, locals)
503+
});
501504
});
502505
};
503506

0 commit comments

Comments
 (0)