Skip to content

Commit 6ea386b

Browse files
committed
Merge pull request select2#981 from backstop/master
Makes it so we don't query every time we select when maximumSelectionSize is 0
2 parents 4a3d3c8 + e7f2aea commit 6ea386b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

select2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2325,7 +2325,7 @@ the specific language governing permissions and limitations under the Apache Lic
23252325
if (this.countSelectableResults()>0) {
23262326
this.search.width(10);
23272327
this.resizeSearch();
2328-
if (this.val().length >= this.getMaximumSelectionSize()) {
2328+
if (this.getMaximumSelectionSize() > 0 && this.val().length >= this.getMaximumSelectionSize()) {
23292329
// if we reached max selection size repaint the results so choices
23302330
// are replaced with the max selection reached message
23312331
this.updateResults(true);

0 commit comments

Comments
 (0)