|
@@ -13064,13 +13064,31 @@ define('select2/defaults',[
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (options.query != null) {
|
|
|
|
+ if (console && console.warn) {
|
|
|
|
+ console.warn(
|
|
|
|
+ 'Select2: The `query` option has been deprecated in favor of a ' +
|
|
|
|
+ 'custom data adapter that overrides the `query` method. Support ' +
|
|
|
|
+ 'will be removed for the `query` option in future versions of ' +
|
|
|
|
+ 'Select2.'
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ options.dataAdapter.prototype.query = function (params, callback) {
|
|
|
|
+ params.callback = callback;
|
|
|
|
+
|
|
|
|
+ options.query.call(null, params);
|
|
|
|
+ };
|
|
|
|
+ }
|
|
|
|
+
|
|
if (options.initSelection != null) {
|
|
if (options.initSelection != null) {
|
|
if (console && console.warn) {
|
|
if (console && console.warn) {
|
|
console.warn(
|
|
console.warn(
|
|
'Select2: The `initSelection` option has been deprecated in favor' +
|
|
'Select2: The `initSelection` option has been deprecated in favor' +
|
|
' of a custom data adapter that overrides the `current` method. ' +
|
|
' of a custom data adapter that overrides the `current` method. ' +
|
|
'This method is now called multiple times instead of a single ' +
|
|
'This method is now called multiple times instead of a single ' +
|
|
- 'time when the instance is initialized.'
|
|
|
|
|
|
+ 'time when the instance is initialized. Support will be removed ' +
|
|
|
|
+ 'for the `initSelection` option in future versions of Select2'
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
|