Skip to content

Commit 1023522

Browse files
committed
Fix for regression caused by angular-ui#718. The search input size was being calculated incorrectly for non-multiple select instances using the Bootstrap theme. Remedy by only calling the sizing function when the select is in multi mode, which is how this function is guarded on other call sites as well.
1 parent 4d9e63d commit 1023522

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/uiSelectDirective.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,10 @@ uis.directive('uiSelect',
211211
attrs.$observe('disabled', function() {
212212
// No need to use $eval() (thanks to ng-disabled) since we already get a boolean instead of a string
213213
$select.disabled = attrs.disabled !== undefined ? attrs.disabled : false;
214-
// As the search input field may now become visible, it may be necessary to recompute its size
215-
$select.sizeSearchInput();
214+
if ($select.multiple) {
215+
// As the search input field may now become visible, it may be necessary to recompute its size
216+
$select.sizeSearchInput();
217+
}
216218
});
217219

218220
attrs.$observe('resetSearchInput', function() {

0 commit comments

Comments
 (0)