Igor Vaynberg 12 năm trước cách đây
mục cha
commit
2cb435680b
1 tập tin đã thay đổi với 6 bổ sung2 xóa
  1. 6 2
      select2.js

+ 6 - 2
select2.js

@@ -1216,8 +1216,12 @@
                 }
             }
 
-            if (search.val().length < opts.minimumInputLength && checkFormatter(opts.formatInputTooShort, "formatInputTooShort")) {
-                render("<li class='select2-no-results'>" + opts.formatInputTooShort(search.val(), opts.minimumInputLength) + "</li>");
+            if (search.val().length < opts.minimumInputLength) {
+                if (checkFormatter(opts.formatInputTooShort, "formatInputTooShort")) {
+                    render("<li class='select2-no-results'>" + opts.formatInputTooShort(search.val(), opts.minimumInputLength) + "</li>");
+                } else {
+                    render("");
+                }
                 return;
             }
             else {