浏览代码

show search if minimum input length has been set

Igor Vaynberg 12 年之前
父节点
当前提交
bcfa3fc702
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      select2.js

+ 2 - 1
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);