Corrected check for opening the dropdown
This corrects the check that was used when the dropdown was opened, so the results would be immediately rendered instead of delaying the loading. Previously it would delay the immediate load but immediately load the results when the search term was emptied. This closes https://github.com/select2/select2/issues/4191 This closes https://github.com/select2/select2/pull/4192 This closes https://github.com/select2/select2/pull/4202
This commit is contained in:
parent
481c43883e
commit
4b9e02f022
2
src/js/select2/data/ajax.js
vendored
2
src/js/select2/data/ajax.js
vendored
@ -94,7 +94,7 @@ define([
|
|||||||
self._request = $request;
|
self._request = $request;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.ajaxOptions.delay && params.term !== '') {
|
if (this.ajaxOptions.delay && params.term != null) {
|
||||||
if (this._queryTimeout) {
|
if (this._queryTimeout) {
|
||||||
window.clearTimeout(this._queryTimeout);
|
window.clearTimeout(this._queryTimeout);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user