Skip to content

Commit

Permalink
Hide select all when searching
Browse files Browse the repository at this point in the history
  • Loading branch information
idostern committed Nov 11, 2013
1 parent 8b394dc commit ebb56dc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bootstrap-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@
if($(e.currentTarget).hasClass('cancel')){
that.$searchbox.val('');
that.$searchbox.trigger('input');
that.$selectAll.show();
}
});

Expand Down Expand Up @@ -602,10 +603,12 @@
that.$searchbox.siblings('span').removeClass('search').addClass('cancel');
that.$searchbox.siblings('span').find('i').removeClass('glyphicon-search').addClass('glyphicon-remove');
that.$menu.find('li').show().not(':icontains(' + that.$searchbox.val() + ')').hide();
that.$selectAll.hide();
} else {
that.$menu.find('li').show();
that.$searchbox.siblings('span').removeClass('cancel').addClass('search');
that.$searchbox.siblings('span').find("i").removeClass('glyphicon-remove').addClass('glyphicon-search');
that.$selectAll.show();
}
});
},
Expand Down

0 comments on commit ebb56dc

Please sign in to comment.