Skip to content

Commit 6b65976

Browse files
committed
Merge pull request select2#893 from bgertonson/ajax_url
select2#608 fix to allow distinct ajax urls
2 parents b0fb36e + 302c87b commit 6b65976

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

select2.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,15 +340,16 @@ the specific language governing permissions and limitations under the Apache Lic
340340
var timeout, // current scheduled but not yet executed request
341341
requestSequence = 0, // sequence used to drop out-of-order responses
342342
handler = null,
343-
quietMillis = options.quietMillis || 100;
343+
quietMillis = options.quietMillis || 100,
344+
ajaxUrl = options.url;
344345

345346
return function (query) {
346347
window.clearTimeout(timeout);
347348
timeout = window.setTimeout(function () {
348349
requestSequence += 1; // increment the sequence
349350
var requestNumber = requestSequence, // this request's sequence number
350351
data = options.data, // ajax data function
351-
url = options.url, // ajax url string or function
352+
url = ajaxUrl, // ajax url string or function
352353
transport = options.transport || $.ajax,
353354
type = options.type || 'GET', // set type of request (GET or POST)
354355
params = {};

0 commit comments

Comments
 (0)