1
0
mirror of synced 2024-11-22 13:06:08 +03:00

Set all AJAX parameters as query string parameters

This will now pass all of the AJAX parameters into the AJAX request as
query string parameters, so now the page number (and other variables)
will be set automatically. This can still be overridden in `ajax.data`
to pass anything else, but this should make it easier for the most
common case.

This closes https://github.com/select2/select2/issues/3548
This closes https://github.com/select2/select2/pull/3552
This commit is contained in:
Kevin Brown 2015-11-09 18:49:40 -05:00
parent ef508db161
commit 7c47912b73

View File

@ -18,9 +18,9 @@ define([
AjaxAdapter.prototype._applyDefaults = function (options) {
var defaults = {
data: function (params) {
return {
return $.extend({}, params, {
q: params.term
};
});
},
transport: function (params, success, failure) {
var $request = $.ajax(params);