We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent af964bd commit 09f24fdCopy full SHA for 09f24fd
1 file changed
select2.js
@@ -250,17 +250,18 @@
250
requestSequence += 1; // increment the sequence
251
var requestNumber = requestSequence, // this request's sequence number
252
data = options.data, // ajax data function
253
- transport = options.transport || $.ajax;
254
-
+ transport = options.transport || $.ajax,
+ type = options.type || 'GET'; // set type of request (GET or POST)
255
+
256
data = data.call(this, query.term, query.page, query.context);
257
- if( null !== handler){
258
- handler.abort();
259
- }
+ if( null !== handler) { handler.abort(); }
260
handler = transport.call(null, {
261
url: options.url,
262
dataType: options.dataType,
263
data: data,
264
+ type: type,
265
success: function (data) {
266
if (requestNumber < requestSequence) {
267
return;
0 commit comments