1
0
mirror of synced 2024-11-30 00:26:03 +03:00

show search if minimum input length has been set

This commit is contained in:
Igor Vaynberg 2013-05-07 08:39:16 -07:00
parent 43e6b86f75
commit bcfa3fc702

View File

@ -1509,6 +1509,7 @@ the specific language governing permissions and limitations under the Apache Lic
} else { } else {
render(""); render("");
} }
if (initial) this.showSearch(true);
return; 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 // 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; var min=this.opts.minimumResultsForSearch;
if (min>=0) { if (min>=0) {
this.showSearch(countResults(data.results)>=min); this.showSearch(countResults(data.results)>=min);