From 5dd0ad92fd918aa4449e29eeed2e378f67bd8dd0 Mon Sep 17 00:00:00 2001 From: Chad Hoffman Date: Wed, 15 Apr 2015 16:24:31 -0400 Subject: [PATCH] fixed issue when an external change to the model doesn't propagate to the 'selected' array --- src/uiSelectMultipleDirective.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/uiSelectMultipleDirective.js b/src/uiSelectMultipleDirective.js index b1e997ec5..1544a3298 100644 --- a/src/uiSelectMultipleDirective.js +++ b/src/uiSelectMultipleDirective.js @@ -135,6 +135,7 @@ uis.directive('uiSelectMultiple', ['uiSelectMinErr','$timeout', function(uiSelec //Watch for external model changes scope.$watchCollection(function(){ return ngModel.$modelValue; }, function(newValue, oldValue) { if (oldValue != newValue){ + $select.selected = ngModel.$modelValue; ngModel.$modelValue = null; //Force scope model value and ngModel value to be out of sync to re-run formatters $selectMultiple.refreshComponent(); }