@syncfusion/ej2-dropdowns 28.1.39 → 28.1.41
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 +36 -27
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +36 -27
- 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 +7 -7
- package/src/common/interface.d.ts +1 -0
- package/src/common/virtual-scroll.js +1 -0
- 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 +2 -2
- package/src/multi-select/multi-select.js +14 -15
|
@@ -581,6 +581,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
|
|
|
581
581
|
}
|
|
582
582
|
if (this.component === 'multiselect') {
|
|
583
583
|
this.parent.updatevirtualizationList();
|
|
584
|
+
this.parent.checkMaxSelection();
|
|
584
585
|
}
|
|
585
586
|
this.parent.getSkeletonCount();
|
|
586
587
|
this.parent.skeletonCount = this.parent.totalItemCount !== 0 && this.parent.totalItemCount < this.parent.itemCount * 2 &&
|
|
@@ -3200,7 +3201,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3200
3201
|
};
|
|
3201
3202
|
};
|
|
3202
3203
|
DropDownList.prototype.setEnableRtl = function () {
|
|
3203
|
-
|
|
3204
|
+
if (!isNullOrUndefined(this.inputElement) && !isNullOrUndefined(this.inputElement.parentElement)) {
|
|
3205
|
+
Input.setEnableRtl(this.enableRtl, [this.inputElement.parentElement]);
|
|
3206
|
+
}
|
|
3204
3207
|
if (this.popupObj) {
|
|
3205
3208
|
this.popupObj.enableRtl = this.enableRtl;
|
|
3206
3209
|
this.popupObj.dataBind();
|
|
@@ -6149,6 +6152,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6149
6152
|
};
|
|
6150
6153
|
DropDownList.prototype.updateInitialData = function () {
|
|
6151
6154
|
var currentData = this.selectData;
|
|
6155
|
+
if (isNullOrUndefined(currentData)) {
|
|
6156
|
+
return;
|
|
6157
|
+
}
|
|
6152
6158
|
var ulElement = this.renderItems(currentData, this.fields);
|
|
6153
6159
|
this.list.scrollTop = 0;
|
|
6154
6160
|
this.virtualListInfo = {
|
|
@@ -6181,7 +6187,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6181
6187
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6182
6188
|
this.list.getElementsByClassName('e-virtual-ddl')[0].style = this.GetVirtualTrackHeight();
|
|
6183
6189
|
}
|
|
6184
|
-
else if (!this.list.querySelector('.e-virtual-ddl')) {
|
|
6190
|
+
else if (!this.list.querySelector('.e-virtual-ddl') && this.list.parentElement) {
|
|
6185
6191
|
var virualElement = this.createElement('div', {
|
|
6186
6192
|
id: this.element.id + '_popup', className: 'e-virtual-ddl', styles: this.GetVirtualTrackHeight()
|
|
6187
6193
|
});
|
|
@@ -6939,7 +6945,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6939
6945
|
if (this.isReact && this.isFiltering() && this.itemTemplate != null) {
|
|
6940
6946
|
setTimeout(function () {
|
|
6941
6947
|
proxy.cloneElements();
|
|
6942
|
-
proxy.isSecondClick = true;
|
|
6948
|
+
proxy.isSecondClick = proxy.isReact && proxy.isFiltering() && proxy.dataSource instanceof DataManager && !proxy.list.querySelector('ul') ? false : true;
|
|
6943
6949
|
}, duration);
|
|
6944
6950
|
}
|
|
6945
6951
|
};
|
|
@@ -7672,7 +7678,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
7672
7678
|
if (firstUl && firstUl.getAttribute('aria-multiselectable')) {
|
|
7673
7679
|
firstUl.removeAttribute('aria-multiselectable');
|
|
7674
7680
|
}
|
|
7675
|
-
this.
|
|
7681
|
+
this.setOldValue();
|
|
7676
7682
|
if (!this.isRemoteData) {
|
|
7677
7683
|
this.isInitialized = true;
|
|
7678
7684
|
}
|
|
@@ -8100,7 +8106,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8100
8106
|
this.triggerChangeEvent(event);
|
|
8101
8107
|
}
|
|
8102
8108
|
this.removeValue = false;
|
|
8103
|
-
this.
|
|
8109
|
+
this.setOldValue();
|
|
8104
8110
|
this.trigger('blur');
|
|
8105
8111
|
};
|
|
8106
8112
|
DropDownTree.prototype.updateView = function () {
|
|
@@ -8133,7 +8139,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8133
8139
|
element: this.element
|
|
8134
8140
|
};
|
|
8135
8141
|
this.trigger('change', eventArgs);
|
|
8136
|
-
this.
|
|
8142
|
+
this.setOldValue();
|
|
8137
8143
|
}
|
|
8138
8144
|
};
|
|
8139
8145
|
DropDownTree.prototype.ddtCompareValues = function (oldValue, newValue) {
|
|
@@ -8604,6 +8610,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8604
8610
|
frameSpan.classList.add(CHECK);
|
|
8605
8611
|
ariaState = 'true';
|
|
8606
8612
|
if (!this.isReverseUpdate) {
|
|
8613
|
+
this.setOldValue();
|
|
8607
8614
|
this.isCheckAllCalled = true;
|
|
8608
8615
|
this.treeObj.checkAll();
|
|
8609
8616
|
if (!this.changeOnBlur) {
|
|
@@ -8768,7 +8775,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8768
8775
|
}
|
|
8769
8776
|
}
|
|
8770
8777
|
if (valArr.length !== 0) {
|
|
8771
|
-
this.
|
|
8778
|
+
this.setOldValue();
|
|
8772
8779
|
this.setProperties({ value: valArr }, true);
|
|
8773
8780
|
this.setValidValue();
|
|
8774
8781
|
}
|
|
@@ -8779,7 +8786,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8779
8786
|
else {
|
|
8780
8787
|
data = this.getItems(this.text);
|
|
8781
8788
|
if (!isNullOrUndefined(data)) {
|
|
8782
|
-
this.
|
|
8789
|
+
this.setOldValue();
|
|
8783
8790
|
this.setProperties({ value: [data[this.fields.value].toString()] }, true);
|
|
8784
8791
|
this.setValidValue();
|
|
8785
8792
|
}
|
|
@@ -8794,7 +8801,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8794
8801
|
return;
|
|
8795
8802
|
}
|
|
8796
8803
|
if (!this.isInitialized) {
|
|
8797
|
-
this.
|
|
8804
|
+
this.setOldValue();
|
|
8798
8805
|
if (this.treeObj.selectedNodes.length > 0 && !this.showCheckBox) {
|
|
8799
8806
|
this.setProperties({ value: this.treeObj.selectedNodes }, true);
|
|
8800
8807
|
if (this.allowMultiSelection) {
|
|
@@ -9387,7 +9394,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
9387
9394
|
};
|
|
9388
9395
|
DropDownTree.prototype.onBeforeSelect = function (args) {
|
|
9389
9396
|
if (args.isInteracted) {
|
|
9390
|
-
this.
|
|
9397
|
+
this.setOldValue();
|
|
9391
9398
|
if (this.value === null) {
|
|
9392
9399
|
this.setProperties({ value: [] }, true);
|
|
9393
9400
|
}
|
|
@@ -9508,7 +9515,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
9508
9515
|
};
|
|
9509
9516
|
DropDownTree.prototype.beforeCheck = function (args) {
|
|
9510
9517
|
if (args.isInteracted) {
|
|
9511
|
-
this.
|
|
9518
|
+
this.setOldValue();
|
|
9512
9519
|
}
|
|
9513
9520
|
};
|
|
9514
9521
|
DropDownTree.prototype.onNodeExpanded = function () {
|
|
@@ -10059,7 +10066,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
10059
10066
|
}
|
|
10060
10067
|
Input.setValue(null, this.inputEle, this.floatLabelType);
|
|
10061
10068
|
if (!isDynamicChange) {
|
|
10062
|
-
this.
|
|
10069
|
+
this.setOldValue();
|
|
10063
10070
|
this.setProperties({ value: [] }, true);
|
|
10064
10071
|
this.showOrHideValueTemplate(false);
|
|
10065
10072
|
}
|
|
@@ -10095,6 +10102,9 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
10095
10102
|
this.setLocale(false);
|
|
10096
10103
|
}
|
|
10097
10104
|
};
|
|
10105
|
+
DropDownTree.prototype.setOldValue = function () {
|
|
10106
|
+
this.oldValue = Array.isArray(this.value) ? this.value.slice() : this.value;
|
|
10107
|
+
};
|
|
10098
10108
|
DropDownTree.prototype.selectAllItems = function (state) {
|
|
10099
10109
|
if (this.showCheckBox) {
|
|
10100
10110
|
if (state) {
|
|
@@ -12752,8 +12762,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12752
12762
|
_this.isValidKey = false;
|
|
12753
12763
|
_this.selectAllEventData = [];
|
|
12754
12764
|
_this.selectAllEventEle = [];
|
|
12755
|
-
_this.resetMainList = null;
|
|
12756
|
-
_this.resetFilteredData = false;
|
|
12757
12765
|
_this.preventSetCurrentData = false;
|
|
12758
12766
|
_this.isSelectAllLoop = false;
|
|
12759
12767
|
_this.scrollFocusStatus = false;
|
|
@@ -13314,6 +13322,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13314
13322
|
if (!this.enableVirtualization || (this.enableVirtualization && (!(this.dataSource instanceof DataManager)))) {
|
|
13315
13323
|
this.initialValueUpdate();
|
|
13316
13324
|
}
|
|
13325
|
+
else {
|
|
13326
|
+
this.initialValueUpdate(this.listData, true);
|
|
13327
|
+
}
|
|
13317
13328
|
this.initialUpdate();
|
|
13318
13329
|
this.refreshPlaceHolder();
|
|
13319
13330
|
if (this.mode !== 'CheckBox' && this.changeOnBlur) {
|
|
@@ -13922,10 +13933,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13922
13933
|
}
|
|
13923
13934
|
}
|
|
13924
13935
|
this.updateDataList();
|
|
13925
|
-
if (this.resetMainList) {
|
|
13926
|
-
this.mainList = this.resetMainList;
|
|
13927
|
-
this.resetMainList = null;
|
|
13928
|
-
}
|
|
13929
13936
|
this.refreshListItems(null);
|
|
13930
13937
|
if (this.mode !== 'Box' && this.mode !== 'CheckBox') {
|
|
13931
13938
|
this.updateDelimView();
|
|
@@ -16072,7 +16079,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16072
16079
|
};
|
|
16073
16080
|
MultiSelect.prototype.search = function (e) {
|
|
16074
16081
|
var _this = this;
|
|
16075
|
-
this.resetFilteredData = true;
|
|
16076
16082
|
this.preventSetCurrentData = false;
|
|
16077
16083
|
this.firstItem = this.dataSource && this.dataSource.length > 0 ? this.dataSource[0] : null;
|
|
16078
16084
|
if (!isNullOrUndefined(e)) {
|
|
@@ -16289,7 +16295,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16289
16295
|
else {
|
|
16290
16296
|
if (this_1.listData) {
|
|
16291
16297
|
if (this_1.enableVirtualization) {
|
|
16292
|
-
if (delim) {
|
|
16298
|
+
if (delim && !this_1.isDynamicRemoteVirtualData) {
|
|
16293
16299
|
data = this_1.delimiterWrapper && this_1.delimiterWrapper.innerHTML === '' ? data :
|
|
16294
16300
|
this_1.delimiterWrapper.innerHTML;
|
|
16295
16301
|
}
|
|
@@ -16302,7 +16308,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16302
16308
|
}
|
|
16303
16309
|
else {
|
|
16304
16310
|
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);
|
|
16311
|
+
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
16312
|
data += temp + delimiterChar + ' ';
|
|
16307
16313
|
text.push(textValues);
|
|
16308
16314
|
hiddenElementContent = this_1.hiddenElement.innerHTML;
|
|
@@ -16470,7 +16476,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16470
16476
|
(this.mode === 'Box' || this.mode === 'Default'))) ||
|
|
16471
16477
|
(this.enableVirtualization && value != null && text != null && !isCustomData)) {
|
|
16472
16478
|
var currentText = [];
|
|
16473
|
-
var textValues = this.text != null && this.text !== '' ? this.text + this.delimiterChar + text : text;
|
|
16479
|
+
var textValues = this.isDynamicRemoteVirtualData && text != null && text !== '' ? text : this.text != null && this.text !== '' ? this.text + this.delimiterChar + text : text;
|
|
16474
16480
|
currentText.push(textValues);
|
|
16475
16481
|
this.setProperties({ text: currentText.toString() }, true);
|
|
16476
16482
|
this.addChip(text, value);
|
|
@@ -17784,11 +17790,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17784
17790
|
MultiSelect.prototype.onPropertyChanged = function (newProp, oldProp) {
|
|
17785
17791
|
if (newProp.dataSource && !isNullOrUndefined(Object.keys(newProp.dataSource))
|
|
17786
17792
|
|| 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
17793
|
this.mainList = null;
|
|
17793
17794
|
this.mainData = null;
|
|
17794
17795
|
this.isFirstClick = false;
|
|
@@ -18057,6 +18058,12 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18057
18058
|
if (!this.enableVirtualization || (this.enableVirtualization && (!(this.dataSource instanceof DataManager)))) {
|
|
18058
18059
|
this.initialValueUpdate();
|
|
18059
18060
|
}
|
|
18061
|
+
else if (!this.isInitRemoteVirtualData) {
|
|
18062
|
+
this.isDynamicRemoteVirtualData = true;
|
|
18063
|
+
this.initialValueUpdate(this.listData, true);
|
|
18064
|
+
this.isDynamicRemoteVirtualData = false;
|
|
18065
|
+
this.initialUpdate();
|
|
18066
|
+
}
|
|
18060
18067
|
if (this.mode !== 'Box' && !this.inputFocus) {
|
|
18061
18068
|
this.updateDelimView();
|
|
18062
18069
|
}
|
|
@@ -18654,9 +18661,11 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18654
18661
|
if (e.result.length > 0) {
|
|
18655
18662
|
listItems_2 = e.result;
|
|
18656
18663
|
_this.initStatus = false;
|
|
18664
|
+
_this.isInitRemoteVirtualData = true;
|
|
18657
18665
|
setTimeout(function () {
|
|
18658
18666
|
_this.initialValueUpdate(listItems_2, true);
|
|
18659
18667
|
_this.initialUpdate();
|
|
18668
|
+
_this.isInitRemoteVirtualData = false;
|
|
18660
18669
|
}, 100);
|
|
18661
18670
|
_this.initStatus = true;
|
|
18662
18671
|
}
|