Skip to content

Commit 7737de9

Browse files
author
Rick Yang
committed
Do not refresh when initialize
[why] No need to refresh data when initialized, just when user input or user opens dropdown. [how] In watch of selection, use $select.open check if need refresh
1 parent 92d0eae commit 7737de9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/uiSelectChoicesDirective.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ uis.directive('uiSelectChoices',
6767
if(newValue && !$select.open && $select.multiple) $select.activate(false, true);
6868
$select.activeIndex = $select.tagging.isActivated ? -1 : 0;
6969
if (!attrs.minimumInputLength || $select.search.length >= attrs.minimumInputLength) {
70-
$select.refresh(attrs.refresh);
70+
if ($select.open) {
71+
$select.refresh(attrs.refresh);
72+
}
7173
} else {
7274
$select.items = [];
7375
}

0 commit comments

Comments
 (0)