@syncfusion/ej2-dropdowns 28.1.39 → 28.2.3
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/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 +50 -29
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +50 -29
- 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 +12 -12
- package/src/common/interface.d.ts +1 -0
- package/src/common/virtual-scroll.js +8 -1
- package/src/drop-down-list/drop-down-list.js +8 -3
- package/src/drop-down-tree/drop-down-tree.d.ts +1 -0
- package/src/drop-down-tree/drop-down-tree.js +13 -9
- package/src/multi-select/multi-select.d.ts +3 -2
- package/src/multi-select/multi-select.js +21 -16
|
@@ -449,7 +449,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
|
|
|
449
449
|
endIndex = this.parent.viewPortInfo.endIndex - this.parent.value.length;
|
|
450
450
|
if (this.parent.viewPortInfo.startIndex === 0) {
|
|
451
451
|
this.parent.updateVirtualReOrderList(true);
|
|
452
|
-
if (this.parent.value.length < this.parent.itemCount) {
|
|
452
|
+
if (this.parent.value.length < this.parent.itemCount && this.parent.value.length !== this.parent.totalItemCount) {
|
|
453
453
|
var oldUlElement = this.parent.list.querySelector('.e-list-parent' + ':not(.e-reorder)');
|
|
454
454
|
if (oldUlElement) {
|
|
455
455
|
this.parent.list.querySelector('.e-virtual-ddl-content').removeChild(oldUlElement);
|
|
@@ -512,6 +512,12 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
|
|
|
512
512
|
if (isListUpdated) {
|
|
513
513
|
for (var i = this.parent.viewPortInfo.startIndex; i < endIndex; i++) {
|
|
514
514
|
var index = i;
|
|
515
|
+
if (this.component === 'multiselect' && this.parent.mode === 'CheckBox') {
|
|
516
|
+
var oldUlElement = this.parent.list.querySelector('.e-list-parent' + '.e-reorder');
|
|
517
|
+
if (oldUlElement) {
|
|
518
|
+
this.parent.list.querySelector('.e-virtual-ddl-content').removeChild(oldUlElement);
|
|
519
|
+
}
|
|
520
|
+
}
|
|
515
521
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
516
522
|
var alreadyAddedData = this.parent.generatedDataObject[index];
|
|
517
523
|
if (this.component === 'multiselect' && this.parent.hideSelectedItem) {
|
|
@@ -581,6 +587,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
|
|
|
581
587
|
}
|
|
582
588
|
if (this.component === 'multiselect') {
|
|
583
589
|
this.parent.updatevirtualizationList();
|
|
590
|
+
this.parent.checkMaxSelection();
|
|
584
591
|
}
|
|
585
592
|
this.parent.getSkeletonCount();
|
|
586
593
|
this.parent.skeletonCount = this.parent.totalItemCount !== 0 && this.parent.totalItemCount < this.parent.itemCount * 2 &&
|
|
@@ -3200,7 +3207,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3200
3207
|
};
|
|
3201
3208
|
};
|
|
3202
3209
|
DropDownList.prototype.setEnableRtl = function () {
|
|
3203
|
-
|
|
3210
|
+
if (!isNullOrUndefined(this.inputElement) && !isNullOrUndefined(this.inputElement.parentElement)) {
|
|
3211
|
+
Input.setEnableRtl(this.enableRtl, [this.inputElement.parentElement]);
|
|
3212
|
+
}
|
|
3204
3213
|
if (this.popupObj) {
|
|
3205
3214
|
this.popupObj.enableRtl = this.enableRtl;
|
|
3206
3215
|
this.popupObj.dataBind();
|
|
@@ -6149,6 +6158,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6149
6158
|
};
|
|
6150
6159
|
DropDownList.prototype.updateInitialData = function () {
|
|
6151
6160
|
var currentData = this.selectData;
|
|
6161
|
+
if (isNullOrUndefined(currentData)) {
|
|
6162
|
+
return;
|
|
6163
|
+
}
|
|
6152
6164
|
var ulElement = this.renderItems(currentData, this.fields);
|
|
6153
6165
|
this.list.scrollTop = 0;
|
|
6154
6166
|
this.virtualListInfo = {
|
|
@@ -6181,7 +6193,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6181
6193
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6182
6194
|
this.list.getElementsByClassName('e-virtual-ddl')[0].style = this.GetVirtualTrackHeight();
|
|
6183
6195
|
}
|
|
6184
|
-
else if (!this.list.querySelector('.e-virtual-ddl')) {
|
|
6196
|
+
else if (!this.list.querySelector('.e-virtual-ddl') && this.list.parentElement) {
|
|
6185
6197
|
var virualElement = this.createElement('div', {
|
|
6186
6198
|
id: this.element.id + '_popup', className: 'e-virtual-ddl', styles: this.GetVirtualTrackHeight()
|
|
6187
6199
|
});
|
|
@@ -6939,7 +6951,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6939
6951
|
if (this.isReact && this.isFiltering() && this.itemTemplate != null) {
|
|
6940
6952
|
setTimeout(function () {
|
|
6941
6953
|
proxy.cloneElements();
|
|
6942
|
-
proxy.isSecondClick = true;
|
|
6954
|
+
proxy.isSecondClick = proxy.isReact && proxy.isFiltering() && proxy.dataSource instanceof DataManager && !proxy.list.querySelector('ul') ? false : true;
|
|
6943
6955
|
}, duration);
|
|
6944
6956
|
}
|
|
6945
6957
|
};
|
|
@@ -7672,7 +7684,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
7672
7684
|
if (firstUl && firstUl.getAttribute('aria-multiselectable')) {
|
|
7673
7685
|
firstUl.removeAttribute('aria-multiselectable');
|
|
7674
7686
|
}
|
|
7675
|
-
this.
|
|
7687
|
+
this.setOldValue();
|
|
7676
7688
|
if (!this.isRemoteData) {
|
|
7677
7689
|
this.isInitialized = true;
|
|
7678
7690
|
}
|
|
@@ -8100,7 +8112,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8100
8112
|
this.triggerChangeEvent(event);
|
|
8101
8113
|
}
|
|
8102
8114
|
this.removeValue = false;
|
|
8103
|
-
this.
|
|
8115
|
+
this.setOldValue();
|
|
8104
8116
|
this.trigger('blur');
|
|
8105
8117
|
};
|
|
8106
8118
|
DropDownTree.prototype.updateView = function () {
|
|
@@ -8133,7 +8145,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8133
8145
|
element: this.element
|
|
8134
8146
|
};
|
|
8135
8147
|
this.trigger('change', eventArgs);
|
|
8136
|
-
this.
|
|
8148
|
+
this.setOldValue();
|
|
8137
8149
|
}
|
|
8138
8150
|
};
|
|
8139
8151
|
DropDownTree.prototype.ddtCompareValues = function (oldValue, newValue) {
|
|
@@ -8604,6 +8616,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8604
8616
|
frameSpan.classList.add(CHECK);
|
|
8605
8617
|
ariaState = 'true';
|
|
8606
8618
|
if (!this.isReverseUpdate) {
|
|
8619
|
+
this.setOldValue();
|
|
8607
8620
|
this.isCheckAllCalled = true;
|
|
8608
8621
|
this.treeObj.checkAll();
|
|
8609
8622
|
if (!this.changeOnBlur) {
|
|
@@ -8768,7 +8781,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8768
8781
|
}
|
|
8769
8782
|
}
|
|
8770
8783
|
if (valArr.length !== 0) {
|
|
8771
|
-
this.
|
|
8784
|
+
this.setOldValue();
|
|
8772
8785
|
this.setProperties({ value: valArr }, true);
|
|
8773
8786
|
this.setValidValue();
|
|
8774
8787
|
}
|
|
@@ -8779,7 +8792,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8779
8792
|
else {
|
|
8780
8793
|
data = this.getItems(this.text);
|
|
8781
8794
|
if (!isNullOrUndefined(data)) {
|
|
8782
|
-
this.
|
|
8795
|
+
this.setOldValue();
|
|
8783
8796
|
this.setProperties({ value: [data[this.fields.value].toString()] }, true);
|
|
8784
8797
|
this.setValidValue();
|
|
8785
8798
|
}
|
|
@@ -8794,7 +8807,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8794
8807
|
return;
|
|
8795
8808
|
}
|
|
8796
8809
|
if (!this.isInitialized) {
|
|
8797
|
-
this.
|
|
8810
|
+
this.setOldValue();
|
|
8798
8811
|
if (this.treeObj.selectedNodes.length > 0 && !this.showCheckBox) {
|
|
8799
8812
|
this.setProperties({ value: this.treeObj.selectedNodes }, true);
|
|
8800
8813
|
if (this.allowMultiSelection) {
|
|
@@ -9387,7 +9400,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
9387
9400
|
};
|
|
9388
9401
|
DropDownTree.prototype.onBeforeSelect = function (args) {
|
|
9389
9402
|
if (args.isInteracted) {
|
|
9390
|
-
this.
|
|
9403
|
+
this.setOldValue();
|
|
9391
9404
|
if (this.value === null) {
|
|
9392
9405
|
this.setProperties({ value: [] }, true);
|
|
9393
9406
|
}
|
|
@@ -9508,7 +9521,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
9508
9521
|
};
|
|
9509
9522
|
DropDownTree.prototype.beforeCheck = function (args) {
|
|
9510
9523
|
if (args.isInteracted) {
|
|
9511
|
-
this.
|
|
9524
|
+
this.setOldValue();
|
|
9512
9525
|
}
|
|
9513
9526
|
};
|
|
9514
9527
|
DropDownTree.prototype.onNodeExpanded = function () {
|
|
@@ -10059,7 +10072,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
10059
10072
|
}
|
|
10060
10073
|
Input.setValue(null, this.inputEle, this.floatLabelType);
|
|
10061
10074
|
if (!isDynamicChange) {
|
|
10062
|
-
this.
|
|
10075
|
+
this.setOldValue();
|
|
10063
10076
|
this.setProperties({ value: [] }, true);
|
|
10064
10077
|
this.showOrHideValueTemplate(false);
|
|
10065
10078
|
}
|
|
@@ -10095,6 +10108,9 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
10095
10108
|
this.setLocale(false);
|
|
10096
10109
|
}
|
|
10097
10110
|
};
|
|
10111
|
+
DropDownTree.prototype.setOldValue = function () {
|
|
10112
|
+
this.oldValue = Array.isArray(this.value) ? this.value.slice() : this.value;
|
|
10113
|
+
};
|
|
10098
10114
|
DropDownTree.prototype.selectAllItems = function (state) {
|
|
10099
10115
|
if (this.showCheckBox) {
|
|
10100
10116
|
if (state) {
|
|
@@ -12749,11 +12765,10 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12749
12765
|
_this.isUpdateFooterHeight = false;
|
|
12750
12766
|
_this.isBlurDispatching = false;
|
|
12751
12767
|
_this.isFilterPrevented = false;
|
|
12768
|
+
_this.isFilteringAction = false;
|
|
12752
12769
|
_this.isValidKey = false;
|
|
12753
12770
|
_this.selectAllEventData = [];
|
|
12754
12771
|
_this.selectAllEventEle = [];
|
|
12755
|
-
_this.resetMainList = null;
|
|
12756
|
-
_this.resetFilteredData = false;
|
|
12757
12772
|
_this.preventSetCurrentData = false;
|
|
12758
12773
|
_this.isSelectAllLoop = false;
|
|
12759
12774
|
_this.scrollFocusStatus = false;
|
|
@@ -13212,7 +13227,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13212
13227
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13213
13228
|
this.totalItemCount = e.count;
|
|
13214
13229
|
}
|
|
13215
|
-
if (this.value && list && list.length > 0 && this.allowFiltering && this.mode !== 'CheckBox' && !this.enableVirtualization && !this.isFilterPrevented && !this.allowCustomValue) {
|
|
13230
|
+
if (this.value && list && list.length > 0 && this.allowFiltering && this.mode !== 'CheckBox' && !this.enableVirtualization && !this.isFilterPrevented && !this.allowCustomValue && this.isFilteringAction) {
|
|
13216
13231
|
var allItemsInValue = list.every(function (item) {
|
|
13217
13232
|
var itemValue = getValue((_this.fields.value) ? _this.fields.value : '', item);
|
|
13218
13233
|
return _this.value.some(function (val) {
|
|
@@ -13314,6 +13329,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13314
13329
|
if (!this.enableVirtualization || (this.enableVirtualization && (!(this.dataSource instanceof DataManager)))) {
|
|
13315
13330
|
this.initialValueUpdate();
|
|
13316
13331
|
}
|
|
13332
|
+
else {
|
|
13333
|
+
this.initialValueUpdate(this.listData, true);
|
|
13334
|
+
}
|
|
13317
13335
|
this.initialUpdate();
|
|
13318
13336
|
this.refreshPlaceHolder();
|
|
13319
13337
|
if (this.mode !== 'CheckBox' && this.changeOnBlur) {
|
|
@@ -13922,10 +13940,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13922
13940
|
}
|
|
13923
13941
|
}
|
|
13924
13942
|
this.updateDataList();
|
|
13925
|
-
if (this.resetMainList) {
|
|
13926
|
-
this.mainList = this.resetMainList;
|
|
13927
|
-
this.resetMainList = null;
|
|
13928
|
-
}
|
|
13929
13943
|
this.refreshListItems(null);
|
|
13930
13944
|
if (this.mode !== 'Box' && this.mode !== 'CheckBox') {
|
|
13931
13945
|
this.updateDelimView();
|
|
@@ -15882,6 +15896,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15882
15896
|
this.totalItemCount = this.value && this.value.length ? this.totalItemCount - this.value.length : this.totalItemCount;
|
|
15883
15897
|
}
|
|
15884
15898
|
this.getSkeletonCount();
|
|
15899
|
+
this.skeletonCount = this.totalItemCount !== 0 && this.totalItemCount < this.itemCount * 2 &&
|
|
15900
|
+
((!(this.dataSource instanceof DataManager)) || ((this.dataSource instanceof DataManager) &&
|
|
15901
|
+
(this.totalItemCount <= this.itemCount))) ? 0 : this.skeletonCount;
|
|
15885
15902
|
this.UpdateSkeleton();
|
|
15886
15903
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15887
15904
|
if (this.list.getElementsByClassName('e-virtual-ddl')[0]) {
|
|
@@ -16072,7 +16089,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16072
16089
|
};
|
|
16073
16090
|
MultiSelect.prototype.search = function (e) {
|
|
16074
16091
|
var _this = this;
|
|
16075
|
-
this.resetFilteredData = true;
|
|
16076
16092
|
this.preventSetCurrentData = false;
|
|
16077
16093
|
this.firstItem = this.dataSource && this.dataSource.length > 0 ? this.dataSource[0] : null;
|
|
16078
16094
|
if (!isNullOrUndefined(e)) {
|
|
@@ -16113,10 +16129,12 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16113
16129
|
if (!eventArgs.cancel) {
|
|
16114
16130
|
if (!_this.isFiltered && !eventArgs.preventDefaultAction) {
|
|
16115
16131
|
_this.filterAction = true;
|
|
16132
|
+
_this.isFilteringAction = true;
|
|
16116
16133
|
if (_this.dataSource instanceof DataManager && _this.allowCustomValue) {
|
|
16117
16134
|
_this.isCustomRendered = false;
|
|
16118
16135
|
}
|
|
16119
16136
|
_this.dataUpdater(_this.dataSource, null, _this.fields);
|
|
16137
|
+
_this.isFilteringAction = false;
|
|
16120
16138
|
}
|
|
16121
16139
|
}
|
|
16122
16140
|
});
|
|
@@ -16289,7 +16307,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16289
16307
|
else {
|
|
16290
16308
|
if (this_1.listData) {
|
|
16291
16309
|
if (this_1.enableVirtualization) {
|
|
16292
|
-
if (delim) {
|
|
16310
|
+
if (delim && !this_1.isDynamicRemoteVirtualData) {
|
|
16293
16311
|
data = this_1.delimiterWrapper && this_1.delimiterWrapper.innerHTML === '' ? data :
|
|
16294
16312
|
this_1.delimiterWrapper.innerHTML;
|
|
16295
16313
|
}
|
|
@@ -16302,7 +16320,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16302
16320
|
}
|
|
16303
16321
|
else {
|
|
16304
16322
|
temp = isInitialVirtualData && delim ? this_1.text : this_1.getTextByValue(value);
|
|
16305
|
-
var textValues = isInitialVirtualData ? this_1.text : (this_1.text && this_1.text !== '' ? this_1.text + this_1.delimiterChar + temp : temp);
|
|
16323
|
+
var textValues = this_1.isDynamicRemoteVirtualData && value != null && value !== '' ? this_1.getTextByValue(value) : isInitialVirtualData ? this_1.text : (this_1.text && this_1.text !== '' ? this_1.text + this_1.delimiterChar + temp : temp);
|
|
16306
16324
|
data += temp + delimiterChar + ' ';
|
|
16307
16325
|
text.push(textValues);
|
|
16308
16326
|
hiddenElementContent = this_1.hiddenElement.innerHTML;
|
|
@@ -16470,7 +16488,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16470
16488
|
(this.mode === 'Box' || this.mode === 'Default'))) ||
|
|
16471
16489
|
(this.enableVirtualization && value != null && text != null && !isCustomData)) {
|
|
16472
16490
|
var currentText = [];
|
|
16473
|
-
var textValues = this.text != null && this.text !== '' ? this.text + this.delimiterChar + text : text;
|
|
16491
|
+
var textValues = this.isDynamicRemoteVirtualData && text != null && text !== '' ? text : this.text != null && this.text !== '' ? this.text + this.delimiterChar + text : text;
|
|
16474
16492
|
currentText.push(textValues);
|
|
16475
16493
|
this.setProperties({ text: currentText.toString() }, true);
|
|
16476
16494
|
this.addChip(text, value);
|
|
@@ -17784,11 +17802,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17784
17802
|
MultiSelect.prototype.onPropertyChanged = function (newProp, oldProp) {
|
|
17785
17803
|
if (newProp.dataSource && !isNullOrUndefined(Object.keys(newProp.dataSource))
|
|
17786
17804
|
|| newProp.query && !isNullOrUndefined(Object.keys(newProp.query))) {
|
|
17787
|
-
if (this.resetFilteredData) {
|
|
17788
|
-
// The filtered data is not being reset in the component after the user focuses out.
|
|
17789
|
-
this.resetMainList = !this.resetMainList ? this.mainList : this.resetMainList;
|
|
17790
|
-
this.resetFilteredData = false;
|
|
17791
|
-
}
|
|
17792
17805
|
this.mainList = null;
|
|
17793
17806
|
this.mainData = null;
|
|
17794
17807
|
this.isFirstClick = false;
|
|
@@ -18057,6 +18070,12 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18057
18070
|
if (!this.enableVirtualization || (this.enableVirtualization && (!(this.dataSource instanceof DataManager)))) {
|
|
18058
18071
|
this.initialValueUpdate();
|
|
18059
18072
|
}
|
|
18073
|
+
else if (!this.isInitRemoteVirtualData) {
|
|
18074
|
+
this.isDynamicRemoteVirtualData = true;
|
|
18075
|
+
this.initialValueUpdate(this.listData, true);
|
|
18076
|
+
this.isDynamicRemoteVirtualData = false;
|
|
18077
|
+
this.initialUpdate();
|
|
18078
|
+
}
|
|
18060
18079
|
if (this.mode !== 'Box' && !this.inputFocus) {
|
|
18061
18080
|
this.updateDelimView();
|
|
18062
18081
|
}
|
|
@@ -18654,9 +18673,11 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18654
18673
|
if (e.result.length > 0) {
|
|
18655
18674
|
listItems_2 = e.result;
|
|
18656
18675
|
_this.initStatus = false;
|
|
18676
|
+
_this.isInitRemoteVirtualData = true;
|
|
18657
18677
|
setTimeout(function () {
|
|
18658
18678
|
_this.initialValueUpdate(listItems_2, true);
|
|
18659
18679
|
_this.initialUpdate();
|
|
18680
|
+
_this.isInitRemoteVirtualData = false;
|
|
18660
18681
|
}, 100);
|
|
18661
18682
|
_this.initStatus = true;
|
|
18662
18683
|
}
|