Переглянути джерело

Merge pull request #2828 from LudoZeGeek/patch-3

Hide search box if select is empty
Kevin Brown 10 роки тому
батько
коміт
48ae56a2b6
1 змінених файлів з 1 додано та 0 видалено
  1. 1 0
      select2.js

+ 1 - 0
select2.js

@@ -1834,6 +1834,7 @@ the specific language governing permissions and limitations under the Apache Lic
 
                 if (data.results.length === 0 && checkFormatter(opts.formatNoMatches, "formatNoMatches")) {
                     render("<li class='select2-no-results'>" + evaluate(opts.formatNoMatches, opts.element, search.val()) + "</li>");
+                    this.showSearch(search.val());
                     return;
                 }