Igor Vaynberg %!s(int64=12) %!d(string=hai) anos
pai
achega
2cb435680b
Modificáronse 1 ficheiros con 6 adicións e 2 borrados
  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 {