Skip to content

Commit

Permalink
Fix #513, fix #510
Browse files Browse the repository at this point in the history
  • Loading branch information
caseyjhol committed Mar 14, 2014
1 parent 5b34f6f commit 13766d7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bootstrap-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
});

$.each(_liA, function(i, item) {
var hide = item === '<a></a>' ? 'class="hide"' : '';
var hide = item === '<a></a>' ? 'class="hide is-hidden"' : '';
_liHtml += '<li rel="' + i + '"' + hide + '>' + item + '</li>';
});

Expand Down Expand Up @@ -653,7 +653,7 @@
that.$menu.find('.active').removeClass('active');
if (!!that.$searchbox.val()) {
that.$searchbox.val('');
that.$menu.find('li').show();
that.$lis.not('.is-hidden').removeClass('hide');
if (!!no_results.parent().length) no_results.remove();
}
if (!that.multiple) that.$menu.find('.selected').addClass('active');
Expand All @@ -664,7 +664,7 @@

this.$searchbox.on('input propertychange', function() {
if (that.$searchbox.val()) {
that.$lis.removeClass('hide').find('a').not(':icontains(' + that.$searchbox.val() + ')').parent().addClass('hide');
that.$lis.not('.is-hidden').removeClass('hide').find('a').not(':icontains(' + that.$searchbox.val() + ')').parent().addClass('hide');

if (!that.$menu.find('li').filter(':visible:not(.no-results)').length) {
if (!!no_results.parent().length) no_results.remove();
Expand All @@ -675,7 +675,7 @@
}

} else {
that.$menu.find('li').removeClass('hide');
that.$lis.not('.is-hidden').removeClass('hide');
if (!!no_results.parent().length) no_results.remove();
}

Expand Down

0 comments on commit 13766d7

Please sign in to comment.