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

Commit ba46179

Browse files
committed
fix(multiple): if item not found on current available lists, add it directly to selected
1 parent cc9198e commit ba46179

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/uiSelectMultipleDirective.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ uis.directive('uiSelectMultiple', ['uiSelectMinErr','$timeout', function(uiSelec
102102
//Check model array of currently selected items
103103
if (!checkFnMultiple($select.selected, inputValue[k])){
104104
//Check model array of all items available
105-
checkFnMultiple(data, inputValue[k]);
105+
if (!checkFnMultiple(data, inputValue[k])){
106+
//If not found on previous lists, just add it directly to resultMultiple
107+
resultMultiple.unshift(inputValue[k]);
108+
}
106109
}
107110
}
108111
return resultMultiple;

0 commit comments

Comments
 (0)