Updated inputData.js
This commit is contained in:
parent
54e126a664
commit
76298267f9
9
src/js/select2/compat/inputData.js
vendored
9
src/js/select2/compat/inputData.js
vendored
@ -1,6 +1,7 @@
|
|||||||
define([
|
define([
|
||||||
'jquery'
|
'jquery',
|
||||||
], function ($) {
|
'../utils'
|
||||||
|
], function ($, Utils) {
|
||||||
function InputData (decorated, $element, options) {
|
function InputData (decorated, $element, options) {
|
||||||
this._currentData = [];
|
this._currentData = [];
|
||||||
this._valueSeparator = options.get('valueSeparator') || ',';
|
this._valueSeparator = options.get('valueSeparator') || ',';
|
||||||
@ -116,8 +117,8 @@ define([
|
|||||||
};
|
};
|
||||||
|
|
||||||
InputData.prototype.addOptions = function (_, $options) {
|
InputData.prototype.addOptions = function (_, $options) {
|
||||||
var options = $.map($options, function ($option) {
|
var options = $.map($options, function ($option) {
|
||||||
return $.data($option[0], 'data');
|
return Utils.GetData($option[0], 'data');
|
||||||
});
|
});
|
||||||
|
|
||||||
this._currentData.push.apply(this._currentData, options);
|
this._currentData.push.apply(this._currentData, options);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user