Skip to content

Commit

Permalink
Merge pull request select2#301 from bhoop/master
Browse files Browse the repository at this point in the history
Add a "Searching" label state for AJAX data
  • Loading branch information
ivaynberg committed Aug 7, 2012
2 parents 3a1dcd1 + b593d06 commit 02326a5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions select2.js
Original file line number Diff line number Diff line change
Expand Up @@ -1081,6 +1081,9 @@
render("<li class='select2-no-results'>" + opts.formatInputTooShort(search.val(), opts.minimumInputLength) + "</li>");
return;
}
else {
render("<li class='select2-searching'>" + opts.formatSearching() + "</li>");
}

this.resultsPage = 1;
opts.query({
Expand Down Expand Up @@ -2193,6 +2196,7 @@
formatInputTooShort: function (input, min) { return "Please enter " + (min - input.length) + " more characters"; },
formatSelectionTooBig: function (limit) { return "You can only select " + limit + " items"; },
formatLoadMore: function (pageNumber) { return "Loading more results..."; },
formatSearch: function () { return "Searching..."; },
minimumResultsForSearch: 0,
minimumInputLength: 0,
maximumSelectionSize: 0,
Expand Down

0 comments on commit 02326a5

Please sign in to comment.