@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
|
@@ -533,6 +533,7 @@ class VirtualScroll {
|
|
|
533
533
|
}
|
|
534
534
|
if (this.component === 'multiselect') {
|
|
535
535
|
this.parent.updatevirtualizationList();
|
|
536
|
+
this.parent.checkMaxSelection();
|
|
536
537
|
}
|
|
537
538
|
this.parent.getSkeletonCount();
|
|
538
539
|
this.parent.skeletonCount = this.parent.totalItemCount !== 0 && this.parent.totalItemCount < this.parent.itemCount * 2 &&
|
|
@@ -3095,7 +3096,9 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3095
3096
|
};
|
|
3096
3097
|
}
|
|
3097
3098
|
setEnableRtl() {
|
|
3098
|
-
|
|
3099
|
+
if (!isNullOrUndefined(this.inputElement) && !isNullOrUndefined(this.inputElement.parentElement)) {
|
|
3100
|
+
Input.setEnableRtl(this.enableRtl, [this.inputElement.parentElement]);
|
|
3101
|
+
}
|
|
3099
3102
|
if (this.popupObj) {
|
|
3100
3103
|
this.popupObj.enableRtl = this.enableRtl;
|
|
3101
3104
|
this.popupObj.dataBind();
|
|
@@ -6020,6 +6023,9 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
6020
6023
|
}
|
|
6021
6024
|
updateInitialData() {
|
|
6022
6025
|
const currentData = this.selectData;
|
|
6026
|
+
if (isNullOrUndefined(currentData)) {
|
|
6027
|
+
return;
|
|
6028
|
+
}
|
|
6023
6029
|
const ulElement = this.renderItems(currentData, this.fields);
|
|
6024
6030
|
this.list.scrollTop = 0;
|
|
6025
6031
|
this.virtualListInfo = {
|
|
@@ -6052,7 +6058,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
6052
6058
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6053
6059
|
this.list.getElementsByClassName('e-virtual-ddl')[0].style = this.GetVirtualTrackHeight();
|
|
6054
6060
|
}
|
|
6055
|
-
else if (!this.list.querySelector('.e-virtual-ddl')) {
|
|
6061
|
+
else if (!this.list.querySelector('.e-virtual-ddl') && this.list.parentElement) {
|
|
6056
6062
|
const virualElement = this.createElement('div', {
|
|
6057
6063
|
id: this.element.id + '_popup', className: 'e-virtual-ddl', styles: this.GetVirtualTrackHeight()
|
|
6058
6064
|
});
|
|
@@ -6801,7 +6807,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
6801
6807
|
if (this.isReact && this.isFiltering() && this.itemTemplate != null) {
|
|
6802
6808
|
setTimeout(() => {
|
|
6803
6809
|
proxy.cloneElements();
|
|
6804
|
-
proxy.isSecondClick = true;
|
|
6810
|
+
proxy.isSecondClick = proxy.isReact && proxy.isFiltering() && proxy.dataSource instanceof DataManager && !proxy.list.querySelector('ul') ? false : true;
|
|
6805
6811
|
}, duration);
|
|
6806
6812
|
}
|
|
6807
6813
|
}
|
|
@@ -7508,7 +7514,7 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
7508
7514
|
if (firstUl && firstUl.getAttribute('aria-multiselectable')) {
|
|
7509
7515
|
firstUl.removeAttribute('aria-multiselectable');
|
|
7510
7516
|
}
|
|
7511
|
-
this.
|
|
7517
|
+
this.setOldValue();
|
|
7512
7518
|
if (!this.isRemoteData) {
|
|
7513
7519
|
this.isInitialized = true;
|
|
7514
7520
|
}
|
|
@@ -7928,7 +7934,7 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
7928
7934
|
this.triggerChangeEvent(event);
|
|
7929
7935
|
}
|
|
7930
7936
|
this.removeValue = false;
|
|
7931
|
-
this.
|
|
7937
|
+
this.setOldValue();
|
|
7932
7938
|
this.trigger('blur');
|
|
7933
7939
|
}
|
|
7934
7940
|
updateView() {
|
|
@@ -7961,7 +7967,7 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
7961
7967
|
element: this.element
|
|
7962
7968
|
};
|
|
7963
7969
|
this.trigger('change', eventArgs);
|
|
7964
|
-
this.
|
|
7970
|
+
this.setOldValue();
|
|
7965
7971
|
}
|
|
7966
7972
|
}
|
|
7967
7973
|
ddtCompareValues(oldValue, newValue) {
|
|
@@ -8428,6 +8434,7 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
8428
8434
|
frameSpan.classList.add(CHECK);
|
|
8429
8435
|
ariaState = 'true';
|
|
8430
8436
|
if (!this.isReverseUpdate) {
|
|
8437
|
+
this.setOldValue();
|
|
8431
8438
|
this.isCheckAllCalled = true;
|
|
8432
8439
|
this.treeObj.checkAll();
|
|
8433
8440
|
if (!this.changeOnBlur) {
|
|
@@ -8590,7 +8597,7 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
8590
8597
|
}
|
|
8591
8598
|
}
|
|
8592
8599
|
if (valArr.length !== 0) {
|
|
8593
|
-
this.
|
|
8600
|
+
this.setOldValue();
|
|
8594
8601
|
this.setProperties({ value: valArr }, true);
|
|
8595
8602
|
this.setValidValue();
|
|
8596
8603
|
}
|
|
@@ -8601,7 +8608,7 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
8601
8608
|
else {
|
|
8602
8609
|
data = this.getItems(this.text);
|
|
8603
8610
|
if (!isNullOrUndefined(data)) {
|
|
8604
|
-
this.
|
|
8611
|
+
this.setOldValue();
|
|
8605
8612
|
this.setProperties({ value: [data[this.fields.value].toString()] }, true);
|
|
8606
8613
|
this.setValidValue();
|
|
8607
8614
|
}
|
|
@@ -8616,7 +8623,7 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
8616
8623
|
return;
|
|
8617
8624
|
}
|
|
8618
8625
|
if (!this.isInitialized) {
|
|
8619
|
-
this.
|
|
8626
|
+
this.setOldValue();
|
|
8620
8627
|
if (this.treeObj.selectedNodes.length > 0 && !this.showCheckBox) {
|
|
8621
8628
|
this.setProperties({ value: this.treeObj.selectedNodes }, true);
|
|
8622
8629
|
if (this.allowMultiSelection) {
|
|
@@ -9201,7 +9208,7 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
9201
9208
|
}
|
|
9202
9209
|
onBeforeSelect(args) {
|
|
9203
9210
|
if (args.isInteracted) {
|
|
9204
|
-
this.
|
|
9211
|
+
this.setOldValue();
|
|
9205
9212
|
if (this.value === null) {
|
|
9206
9213
|
this.setProperties({ value: [] }, true);
|
|
9207
9214
|
}
|
|
@@ -9322,7 +9329,7 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
9322
9329
|
}
|
|
9323
9330
|
beforeCheck(args) {
|
|
9324
9331
|
if (args.isInteracted) {
|
|
9325
|
-
this.
|
|
9332
|
+
this.setOldValue();
|
|
9326
9333
|
}
|
|
9327
9334
|
}
|
|
9328
9335
|
onNodeExpanded() {
|
|
@@ -9868,7 +9875,7 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
9868
9875
|
}
|
|
9869
9876
|
Input.setValue(null, this.inputEle, this.floatLabelType);
|
|
9870
9877
|
if (!isDynamicChange) {
|
|
9871
|
-
this.
|
|
9878
|
+
this.setOldValue();
|
|
9872
9879
|
this.setProperties({ value: [] }, true);
|
|
9873
9880
|
this.showOrHideValueTemplate(false);
|
|
9874
9881
|
}
|
|
@@ -9904,6 +9911,9 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
9904
9911
|
this.setLocale(false);
|
|
9905
9912
|
}
|
|
9906
9913
|
}
|
|
9914
|
+
setOldValue() {
|
|
9915
|
+
this.oldValue = Array.isArray(this.value) ? this.value.slice() : this.value;
|
|
9916
|
+
}
|
|
9907
9917
|
selectAllItems(state) {
|
|
9908
9918
|
if (this.showCheckBox) {
|
|
9909
9919
|
if (state) {
|
|
@@ -12504,8 +12514,6 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
12504
12514
|
this.isValidKey = false;
|
|
12505
12515
|
this.selectAllEventData = [];
|
|
12506
12516
|
this.selectAllEventEle = [];
|
|
12507
|
-
this.resetMainList = null;
|
|
12508
|
-
this.resetFilteredData = false;
|
|
12509
12517
|
this.preventSetCurrentData = false;
|
|
12510
12518
|
this.isSelectAllLoop = false;
|
|
12511
12519
|
this.scrollFocusStatus = false;
|
|
@@ -13062,6 +13070,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
13062
13070
|
if (!this.enableVirtualization || (this.enableVirtualization && (!(this.dataSource instanceof DataManager)))) {
|
|
13063
13071
|
this.initialValueUpdate();
|
|
13064
13072
|
}
|
|
13073
|
+
else {
|
|
13074
|
+
this.initialValueUpdate(this.listData, true);
|
|
13075
|
+
}
|
|
13065
13076
|
this.initialUpdate();
|
|
13066
13077
|
this.refreshPlaceHolder();
|
|
13067
13078
|
if (this.mode !== 'CheckBox' && this.changeOnBlur) {
|
|
@@ -13670,10 +13681,6 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
13670
13681
|
}
|
|
13671
13682
|
}
|
|
13672
13683
|
this.updateDataList();
|
|
13673
|
-
if (this.resetMainList) {
|
|
13674
|
-
this.mainList = this.resetMainList;
|
|
13675
|
-
this.resetMainList = null;
|
|
13676
|
-
}
|
|
13677
13684
|
this.refreshListItems(null);
|
|
13678
13685
|
if (this.mode !== 'Box' && this.mode !== 'CheckBox') {
|
|
13679
13686
|
this.updateDelimView();
|
|
@@ -15803,7 +15810,6 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
15803
15810
|
});
|
|
15804
15811
|
}
|
|
15805
15812
|
search(e) {
|
|
15806
|
-
this.resetFilteredData = true;
|
|
15807
15813
|
this.preventSetCurrentData = false;
|
|
15808
15814
|
this.firstItem = this.dataSource && this.dataSource.length > 0 ? this.dataSource[0] : null;
|
|
15809
15815
|
if (!isNullOrUndefined(e)) {
|
|
@@ -16020,7 +16026,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
16020
16026
|
else {
|
|
16021
16027
|
if (this.listData) {
|
|
16022
16028
|
if (this.enableVirtualization) {
|
|
16023
|
-
if (delim) {
|
|
16029
|
+
if (delim && !this.isDynamicRemoteVirtualData) {
|
|
16024
16030
|
data = this.delimiterWrapper && this.delimiterWrapper.innerHTML === '' ? data :
|
|
16025
16031
|
this.delimiterWrapper.innerHTML;
|
|
16026
16032
|
}
|
|
@@ -16033,7 +16039,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
16033
16039
|
}
|
|
16034
16040
|
else {
|
|
16035
16041
|
temp = isInitialVirtualData && delim ? this.text : this.getTextByValue(value);
|
|
16036
|
-
const textValues = isInitialVirtualData ? this.text : (this.text && this.text !== '' ? this.text + this.delimiterChar + temp : temp);
|
|
16042
|
+
const textValues = this.isDynamicRemoteVirtualData && value != null && value !== '' ? this.getTextByValue(value) : isInitialVirtualData ? this.text : (this.text && this.text !== '' ? this.text + this.delimiterChar + temp : temp);
|
|
16037
16043
|
data += temp + delimiterChar + ' ';
|
|
16038
16044
|
text.push(textValues);
|
|
16039
16045
|
hiddenElementContent = this.hiddenElement.innerHTML;
|
|
@@ -16193,7 +16199,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
16193
16199
|
(this.mode === 'Box' || this.mode === 'Default'))) ||
|
|
16194
16200
|
(this.enableVirtualization && value != null && text != null && !isCustomData)) {
|
|
16195
16201
|
const currentText = [];
|
|
16196
|
-
const textValues = this.text != null && this.text !== '' ? this.text + this.delimiterChar + text : text;
|
|
16202
|
+
const textValues = this.isDynamicRemoteVirtualData && text != null && text !== '' ? text : this.text != null && this.text !== '' ? this.text + this.delimiterChar + text : text;
|
|
16197
16203
|
currentText.push(textValues);
|
|
16198
16204
|
this.setProperties({ text: currentText.toString() }, true);
|
|
16199
16205
|
this.addChip(text, value);
|
|
@@ -17501,11 +17507,6 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
17501
17507
|
onPropertyChanged(newProp, oldProp) {
|
|
17502
17508
|
if (newProp.dataSource && !isNullOrUndefined(Object.keys(newProp.dataSource))
|
|
17503
17509
|
|| newProp.query && !isNullOrUndefined(Object.keys(newProp.query))) {
|
|
17504
|
-
if (this.resetFilteredData) {
|
|
17505
|
-
// The filtered data is not being reset in the component after the user focuses out.
|
|
17506
|
-
this.resetMainList = !this.resetMainList ? this.mainList : this.resetMainList;
|
|
17507
|
-
this.resetFilteredData = false;
|
|
17508
|
-
}
|
|
17509
17510
|
this.mainList = null;
|
|
17510
17511
|
this.mainData = null;
|
|
17511
17512
|
this.isFirstClick = false;
|
|
@@ -17772,6 +17773,12 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
17772
17773
|
if (!this.enableVirtualization || (this.enableVirtualization && (!(this.dataSource instanceof DataManager)))) {
|
|
17773
17774
|
this.initialValueUpdate();
|
|
17774
17775
|
}
|
|
17776
|
+
else if (!this.isInitRemoteVirtualData) {
|
|
17777
|
+
this.isDynamicRemoteVirtualData = true;
|
|
17778
|
+
this.initialValueUpdate(this.listData, true);
|
|
17779
|
+
this.isDynamicRemoteVirtualData = false;
|
|
17780
|
+
this.initialUpdate();
|
|
17781
|
+
}
|
|
17775
17782
|
if (this.mode !== 'Box' && !this.inputFocus) {
|
|
17776
17783
|
this.updateDelimView();
|
|
17777
17784
|
}
|
|
@@ -18364,9 +18371,11 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
18364
18371
|
if (e.result.length > 0) {
|
|
18365
18372
|
listItems = e.result;
|
|
18366
18373
|
this.initStatus = false;
|
|
18374
|
+
this.isInitRemoteVirtualData = true;
|
|
18367
18375
|
setTimeout(() => {
|
|
18368
18376
|
this.initialValueUpdate(listItems, true);
|
|
18369
18377
|
this.initialUpdate();
|
|
18378
|
+
this.isInitRemoteVirtualData = false;
|
|
18370
18379
|
}, 100);
|
|
18371
18380
|
this.initStatus = true;
|
|
18372
18381
|
}
|