fixed jQuer dprecations
This commit is contained in:
6
src/inputs/select2/lib/select2.js
vendored
6
src/inputs/select2/lib/select2.js
vendored
@@ -476,7 +476,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
||||
tmp,
|
||||
text = function (item) { return ""+item.text; }; // function used to retrieve the text portion of a data item that is matched against the search
|
||||
|
||||
if ($.isArray(data)) {
|
||||
if (Array.isArray(data)) {
|
||||
tmp = data;
|
||||
data = { results: tmp };
|
||||
}
|
||||
@@ -909,7 +909,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
||||
opts.id = function (e) { return e[idKey]; };
|
||||
}
|
||||
|
||||
if ($.isArray(opts.element.data("select2Tags"))) {
|
||||
if (Array.isArray(opts.element.data("select2Tags"))) {
|
||||
if ("tags" in opts) {
|
||||
throw "tags specified as both an attribute 'data-select2-tags' and in options of Select2 " + opts.element.attr("id");
|
||||
}
|
||||
@@ -1586,7 +1586,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
||||
var maxSelSize = this.getMaximumSelectionSize();
|
||||
if (maxSelSize >=1) {
|
||||
data = this.data();
|
||||
if ($.isArray(data) && data.length >= maxSelSize && checkFormatter(opts.formatSelectionTooBig, "formatSelectionTooBig")) {
|
||||
if (Array.isArray(data) && data.length >= maxSelSize && checkFormatter(opts.formatSelectionTooBig, "formatSelectionTooBig")) {
|
||||
render("<li class='select2-selection-limit'>" + opts.formatSelectionTooBig(maxSelSize) + "</li>");
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user