@syncfusion/ej2-dropdowns 22.2.8 → 22.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/ej2-dropdowns.min.js +2 -2
- package/dist/ej2-dropdowns.umd.min.js +2 -2
- package/dist/ej2-dropdowns.umd.min.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es2015.js +62 -50
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +62 -50
- package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
- package/dist/global/ej2-dropdowns.min.js +2 -2
- package/dist/global/ej2-dropdowns.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +9 -9
- package/src/combo-box/combo-box.js +2 -1
- package/src/drop-down-base/drop-down-base.d.ts +1 -0
- package/src/drop-down-base/drop-down-base.js +54 -47
- package/src/drop-down-list/drop-down-list.js +6 -2
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 22.2.
|
|
3
|
+
* version : 22.2.9
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-dropdowns@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-dropdowns@22.2.
|
|
3
|
+
"_id": "@syncfusion/ej2-dropdowns@22.2.8",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-hqHfCzh6fnrcpqCTPy9dL3EjdIuqsaklD4YP+rBRcqQNi4CWDJCZYzxXNPXl7lNyMKFFz6Sjrr8eoF6DHOsQxA==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-dropdowns",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"/@syncfusion/ej2-spreadsheet",
|
|
35
35
|
"/@syncfusion/ej2-vue-dropdowns"
|
|
36
36
|
],
|
|
37
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-22.2.
|
|
38
|
-
"_shasum": "
|
|
37
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-22.2.8.tgz",
|
|
38
|
+
"_shasum": "b6f13090710d0c2c6b0d7d9de58fb019c52c0b46",
|
|
39
39
|
"_spec": "@syncfusion/ej2-dropdowns@*",
|
|
40
40
|
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
|
|
41
41
|
"author": {
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
},
|
|
44
44
|
"bundleDependencies": false,
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@syncfusion/ej2-base": "~22.2.
|
|
46
|
+
"@syncfusion/ej2-base": "~22.2.9",
|
|
47
47
|
"@syncfusion/ej2-data": "~22.2.5",
|
|
48
|
-
"@syncfusion/ej2-inputs": "~22.2.
|
|
49
|
-
"@syncfusion/ej2-lists": "~22.2.
|
|
48
|
+
"@syncfusion/ej2-inputs": "~22.2.9",
|
|
49
|
+
"@syncfusion/ej2-lists": "~22.2.9",
|
|
50
50
|
"@syncfusion/ej2-navigations": "~22.2.8",
|
|
51
|
-
"@syncfusion/ej2-popups": "~22.2.
|
|
51
|
+
"@syncfusion/ej2-popups": "~22.2.9"
|
|
52
52
|
},
|
|
53
53
|
"deprecated": false,
|
|
54
54
|
"description": "Essential JS 2 DropDown Components",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"module": "./index.js",
|
|
74
74
|
"name": "@syncfusion/ej2-dropdowns",
|
|
75
75
|
"typings": "index.d.ts",
|
|
76
|
-
"version": "22.2.
|
|
76
|
+
"version": "22.2.9",
|
|
77
77
|
"sideEffects": false,
|
|
78
78
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
|
79
79
|
}
|
|
@@ -210,7 +210,8 @@ var ComboBox = /** @class */ (function (_super) {
|
|
|
210
210
|
};
|
|
211
211
|
ComboBox.prototype.setSearchBox = function () {
|
|
212
212
|
this.filterInput = this.inputElement;
|
|
213
|
-
|
|
213
|
+
var searchBoxContainer = (this.isFiltering() || (this.isReact && this.getModuleName() === 'combobox')) ? this.inputWrapper : inputObject;
|
|
214
|
+
return searchBoxContainer;
|
|
214
215
|
};
|
|
215
216
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
216
217
|
ComboBox.prototype.onActionComplete = function (ulElement, list, e, isUpdated) {
|
|
@@ -217,6 +217,7 @@ export declare class DropDownBase extends Component<HTMLElement> implements INot
|
|
|
217
217
|
protected isDynamicDataChange: boolean;
|
|
218
218
|
protected addedNewItem: boolean;
|
|
219
219
|
protected isAddNewItemTemplate: boolean;
|
|
220
|
+
private isRequesting;
|
|
220
221
|
/**
|
|
221
222
|
* The `fields` property maps the columns of the data table and binds the data to the component.
|
|
222
223
|
* * text - Maps the text column from data table for each list item.
|
|
@@ -90,6 +90,7 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
90
90
|
_this.isDynamicDataChange = false;
|
|
91
91
|
_this.addedNewItem = false;
|
|
92
92
|
_this.isAddNewItemTemplate = false;
|
|
93
|
+
_this.isRequesting = false;
|
|
93
94
|
return _this;
|
|
94
95
|
}
|
|
95
96
|
DropDownBase.prototype.getPropObject = function (prop, newProp, oldProp) {
|
|
@@ -473,61 +474,67 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
473
474
|
this.isActive = true;
|
|
474
475
|
var eventArgs = { cancel: false, data: dataSource, query: query };
|
|
475
476
|
this.isPreventChange = this.isAngular && this.preventChange ? true : this.isPreventChange;
|
|
476
|
-
this.
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
_this.
|
|
481
|
-
if (
|
|
482
|
-
_this.
|
|
483
|
-
|
|
477
|
+
if (!this.isRequesting) {
|
|
478
|
+
this.trigger('actionBegin', eventArgs, function (eventArgs) {
|
|
479
|
+
if (!eventArgs.cancel) {
|
|
480
|
+
_this.isRequesting = true;
|
|
481
|
+
_this.showSpinner();
|
|
482
|
+
if (dataSource instanceof DataManager) {
|
|
483
|
+
_this.isRequested = true;
|
|
484
|
+
if (_this.isDataFetched) {
|
|
485
|
+
_this.emptyDataRequest(fields);
|
|
486
|
+
return;
|
|
487
|
+
}
|
|
488
|
+
eventArgs.data.executeQuery(_this.getQuery(eventArgs.query)).then(function (e) {
|
|
489
|
+
_this.isPreventChange = _this.isAngular && _this.preventChange ? true : _this.isPreventChange;
|
|
490
|
+
_this.trigger('actionComplete', e, function (e) {
|
|
491
|
+
if (!e.cancel) {
|
|
492
|
+
_this.isRequesting = false;
|
|
493
|
+
var listItems = e.result;
|
|
494
|
+
if (listItems.length === 0) {
|
|
495
|
+
_this.isDataFetched = true;
|
|
496
|
+
}
|
|
497
|
+
ulElement = _this.renderItems(listItems, fields);
|
|
498
|
+
_this.onActionComplete(ulElement, listItems, e);
|
|
499
|
+
if (_this.groupTemplate) {
|
|
500
|
+
_this.renderGroupTemplate(ulElement);
|
|
501
|
+
}
|
|
502
|
+
_this.isRequested = false;
|
|
503
|
+
_this.bindChildItems(listItems, ulElement, fields, e);
|
|
504
|
+
}
|
|
505
|
+
});
|
|
506
|
+
}).catch(function (e) {
|
|
507
|
+
_this.isRequested = false;
|
|
508
|
+
_this.isRequesting = false;
|
|
509
|
+
_this.onActionFailure(e);
|
|
510
|
+
_this.hideSpinner();
|
|
511
|
+
});
|
|
484
512
|
}
|
|
485
|
-
|
|
513
|
+
else {
|
|
514
|
+
var dataManager = new DataManager(eventArgs.data);
|
|
515
|
+
var listItems = (_this.getQuery(eventArgs.query)).executeLocal(dataManager);
|
|
516
|
+
var localDataArgs = { cancel: false, result: listItems };
|
|
486
517
|
_this.isPreventChange = _this.isAngular && _this.preventChange ? true : _this.isPreventChange;
|
|
487
|
-
_this.trigger('actionComplete',
|
|
488
|
-
if (!
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
}
|
|
493
|
-
ulElement = _this.renderItems(listItems, fields);
|
|
494
|
-
_this.onActionComplete(ulElement, listItems, e);
|
|
518
|
+
_this.trigger('actionComplete', localDataArgs, function (localDataArgs) {
|
|
519
|
+
if (!localDataArgs.cancel) {
|
|
520
|
+
_this.isRequesting = false;
|
|
521
|
+
ulElement = _this.renderItems(localDataArgs.result, fields);
|
|
522
|
+
_this.onActionComplete(ulElement, localDataArgs.result, event);
|
|
495
523
|
if (_this.groupTemplate) {
|
|
496
524
|
_this.renderGroupTemplate(ulElement);
|
|
497
525
|
}
|
|
498
|
-
_this.
|
|
499
|
-
|
|
526
|
+
_this.bindChildItems(localDataArgs.result, ulElement, fields);
|
|
527
|
+
setTimeout(function () {
|
|
528
|
+
if (_this.getModuleName() === 'multiselect' && _this.itemTemplate != null && (ulElement.childElementCount > 0 && (ulElement.children[0].childElementCount > 0 || (_this.fields.groupBy && ulElement.children[1] && ulElement.children[1].childElementCount > 0)))) {
|
|
529
|
+
_this.updateDataList();
|
|
530
|
+
}
|
|
531
|
+
});
|
|
500
532
|
}
|
|
501
533
|
});
|
|
502
|
-
}
|
|
503
|
-
_this.isRequested = false;
|
|
504
|
-
_this.onActionFailure(e);
|
|
505
|
-
_this.hideSpinner();
|
|
506
|
-
});
|
|
507
|
-
}
|
|
508
|
-
else {
|
|
509
|
-
var dataManager = new DataManager(eventArgs.data);
|
|
510
|
-
var listItems = (_this.getQuery(eventArgs.query)).executeLocal(dataManager);
|
|
511
|
-
var localDataArgs = { cancel: false, result: listItems };
|
|
512
|
-
_this.isPreventChange = _this.isAngular && _this.preventChange ? true : _this.isPreventChange;
|
|
513
|
-
_this.trigger('actionComplete', localDataArgs, function (localDataArgs) {
|
|
514
|
-
if (!localDataArgs.cancel) {
|
|
515
|
-
ulElement = _this.renderItems(localDataArgs.result, fields);
|
|
516
|
-
_this.onActionComplete(ulElement, localDataArgs.result, event);
|
|
517
|
-
if (_this.groupTemplate) {
|
|
518
|
-
_this.renderGroupTemplate(ulElement);
|
|
519
|
-
}
|
|
520
|
-
_this.bindChildItems(localDataArgs.result, ulElement, fields);
|
|
521
|
-
setTimeout(function () {
|
|
522
|
-
if (_this.getModuleName() === 'multiselect' && _this.itemTemplate != null && (ulElement.childElementCount > 0 && (ulElement.children[0].childElementCount > 0 || (_this.fields.groupBy && ulElement.children[1] && ulElement.children[1].childElementCount > 0)))) {
|
|
523
|
-
_this.updateDataList();
|
|
524
|
-
}
|
|
525
|
-
});
|
|
526
|
-
}
|
|
527
|
-
});
|
|
534
|
+
}
|
|
528
535
|
}
|
|
529
|
-
}
|
|
530
|
-
}
|
|
536
|
+
});
|
|
537
|
+
}
|
|
531
538
|
};
|
|
532
539
|
DropDownBase.prototype.bindChildItems = function (listItems, ulElement, fields, e) {
|
|
533
540
|
var _this = this;
|
|
@@ -1513,7 +1513,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1513
1513
|
this.isNotSearchList = false;
|
|
1514
1514
|
return;
|
|
1515
1515
|
}
|
|
1516
|
-
if (this.isActive) {
|
|
1516
|
+
if (this.isActive || !isNullOrUndefined(ulElement)) {
|
|
1517
1517
|
var selectedItem = this.selectedLI ? this.selectedLI.cloneNode(true) : null;
|
|
1518
1518
|
_super.prototype.onActionComplete.call(this, ulElement, list, e);
|
|
1519
1519
|
this.updateSelectElementData(this.allowFiltering);
|
|
@@ -2226,7 +2226,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2226
2226
|
DropDownList.prototype.setFooterTemplate = function (popupEle) {
|
|
2227
2227
|
var compiledString;
|
|
2228
2228
|
if (this.footer) {
|
|
2229
|
-
if (this.isReact) {
|
|
2229
|
+
if (this.isReact && typeof this.footerTemplate === 'function') {
|
|
2230
2230
|
this.clearTemplate(['footerTemplate']);
|
|
2231
2231
|
}
|
|
2232
2232
|
else {
|
|
@@ -2312,6 +2312,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2312
2312
|
if (this.allowFiltering && newProp.dataSource && !isNullOrUndefined(Object.keys(newProp.dataSource))) {
|
|
2313
2313
|
this.actionCompleteData = { ulElement: null, list: null, isUpdated: false };
|
|
2314
2314
|
this.actionData = this.actionCompleteData;
|
|
2315
|
+
this.itemData = null;
|
|
2315
2316
|
}
|
|
2316
2317
|
else if (this.allowFiltering && newProp.query && !isNullOrUndefined(Object.keys(newProp.query))) {
|
|
2317
2318
|
this.actionCompleteData = this.getModuleName() === 'combobox' ?
|
|
@@ -2819,6 +2820,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2819
2820
|
if (this.inputElement && !isNullOrUndefined(this.inputElement.onchange)) {
|
|
2820
2821
|
this.inputElement.onchange = null;
|
|
2821
2822
|
}
|
|
2823
|
+
if (this.isAngular) {
|
|
2824
|
+
this.inputElement = null;
|
|
2825
|
+
}
|
|
2822
2826
|
_super.prototype.destroy.call(this);
|
|
2823
2827
|
};
|
|
2824
2828
|
/* eslint-disable valid-jsdoc, jsdoc/require-returns-description */
|