Merge branch 'master' of git://github.com/ivaynberg/select2
This commit is contained in:
commit
a6edacc505
@ -212,6 +212,7 @@
|
|||||||
function ajax(options) {
|
function ajax(options) {
|
||||||
var timeout, // current scheduled but not yet executed request
|
var timeout, // current scheduled but not yet executed request
|
||||||
requestSequence = 0, // sequence used to drop out-of-order responses
|
requestSequence = 0, // sequence used to drop out-of-order responses
|
||||||
|
handler = null,
|
||||||
quietMillis = options.quietMillis || 100;
|
quietMillis = options.quietMillis || 100;
|
||||||
|
|
||||||
return function (query) {
|
return function (query) {
|
||||||
@ -224,7 +225,10 @@
|
|||||||
|
|
||||||
data = data.call(this, query.term, query.page);
|
data = data.call(this, query.term, query.page);
|
||||||
|
|
||||||
transport.call(null, {
|
if( null !== handler){
|
||||||
|
handler.abort();
|
||||||
|
}
|
||||||
|
handler = transport.call(null, {
|
||||||
url: options.url,
|
url: options.url,
|
||||||
dataType: options.dataType,
|
dataType: options.dataType,
|
||||||
data: data,
|
data: data,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user