Browse Source

Merge pull request #2828 from LudoZeGeek/patch-3

Hide search box if select is empty
Kevin Brown 10 years ago
parent
commit
48ae56a2b6
1 changed files with 1 additions and 0 deletions
  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;
                 }