From ebb56dc44f9362816cc5cf60e77cc7937cc07ff7 Mon Sep 17 00:00:00 2001 From: idostern Date: Mon, 11 Nov 2013 10:01:42 +0200 Subject: [PATCH] Hide select all when searching --- bootstrap-select.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bootstrap-select.js b/bootstrap-select.js index 335e842a4..5c97178b2 100644 --- a/bootstrap-select.js +++ b/bootstrap-select.js @@ -563,6 +563,7 @@ if($(e.currentTarget).hasClass('cancel')){ that.$searchbox.val(''); that.$searchbox.trigger('input'); + that.$selectAll.show(); } }); @@ -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(); } }); },