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

Commit ca03f0b

Browse files
committed
Fix: Search box not shown to search when data is an empty array with select2 theme
1 parent d1ce1cf commit ca03f0b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/uiSelectDirective.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -413,9 +413,11 @@ uis.directive('uiSelect',
413413
if ($select.search === '' && !opened) {
414414
dropdown[0].style.opacity = 0;
415415
opened = true;
416-
}
416+
}
417+
418+
var isSelect2Theme = angular.element(element).hasClass("select2");
419+
if (!uisOffset(dropdown).height && $select.$animate && $select.$animate.on && $select.$animate.enabled(dropdown) && !isSelect2Theme) {
417420

418-
if (!uisOffset(dropdown).height && $select.$animate && $select.$animate.on && $select.$animate.enabled(dropdown)) {
419421
var needsCalculated = true;
420422

421423
$select.$animate.on('enter', dropdown, function (elem, phase) {

0 commit comments

Comments
 (0)