We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0160b36 + b3d9e7c commit a6edaccCopy full SHA for a6edacc
1 file changed
select2.js
@@ -212,6 +212,7 @@
212
function ajax(options) {
213
var timeout, // current scheduled but not yet executed request
214
requestSequence = 0, // sequence used to drop out-of-order responses
215
+ handler = null,
216
quietMillis = options.quietMillis || 100;
217
218
return function (query) {
@@ -224,7 +225,10 @@
224
225
226
data = data.call(this, query.term, query.page);
227
- transport.call(null, {
228
+ if( null !== handler){
229
+ handler.abort();
230
+ }
231
+ handler = transport.call(null, {
232
url: options.url,
233
dataType: options.dataType,
234
data: data,
0 commit comments