From bcfa3fc702f29485d36ebdc9c5b12c05d1d551bd Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Tue, 7 May 2013 08:39:16 -0700 Subject: [PATCH] show search if minimum input length has been set --- select2.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/select2.js b/select2.js index b6aa6595..41d0cefb 100644 --- a/select2.js +++ b/select2.js @@ -1509,6 +1509,7 @@ the specific language governing permissions and limitations under the Apache Lic } else { render(""); } + if (initial) this.showSearch(true); return; } @@ -2040,7 +2041,7 @@ the specific language governing permissions and limitations under the Apache Lic // show the search box if this is the first we got the results and there are enough of them for search - if (initial === true) { + if (initial === true && this.showSearchInput === false) { var min=this.opts.minimumResultsForSearch; if (min>=0) { this.showSearch(countResults(data.results)>=min);