@syncfusion/ej2-dropdowns 28.1.41 → 28.2.4
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 +38 -6
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +39 -6
- 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/virtual-scroll.js +7 -1
- package/src/drop-down-base/drop-down-base.d.ts +2 -0
- package/src/drop-down-base/drop-down-base.js +9 -2
- package/src/drop-down-tree/drop-down-tree.js +6 -0
- package/src/list-box/list-box.d.ts +1 -0
- package/src/list-box/list-box.js +6 -2
- package/src/multi-select/multi-select.d.ts +2 -0
- package/src/multi-select/multi-select.js +11 -1
|
@@ -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) {
|
|
@@ -973,6 +979,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
973
979
|
_this.CurrentEvent = null;
|
|
974
980
|
_this.isDynamicData = false;
|
|
975
981
|
_this.isPrimitiveData = false;
|
|
982
|
+
_this.isCustomFiltering = false;
|
|
976
983
|
_this.virtualListInfo = {
|
|
977
984
|
currentPageNumber: null,
|
|
978
985
|
direction: null,
|
|
@@ -1561,7 +1568,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1561
1568
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1562
1569
|
newQuery.queries[queryElements].e.nos = e.count;
|
|
1563
1570
|
}
|
|
1564
|
-
if (_this.getModuleName() === 'multiselect' && (newQuery.queries[queryElements].e.condition === 'or' || newQuery.queries[queryElements].e.operator === 'equal')) {
|
|
1571
|
+
if (_this.getModuleName() === 'multiselect' && (newQuery.queries[queryElements].e.condition === 'or' || newQuery.queries[queryElements].e.operator === 'equal') && !_this.isCustomFiltering) {
|
|
1565
1572
|
isReOrder = false;
|
|
1566
1573
|
}
|
|
1567
1574
|
}
|
|
@@ -1585,6 +1592,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1585
1592
|
_this.trigger('actionComplete', e, function (e) {
|
|
1586
1593
|
if (!e.cancel) {
|
|
1587
1594
|
_this.isRequesting = false;
|
|
1595
|
+
_this.isCustomFiltering = false;
|
|
1588
1596
|
var listItems = e.result;
|
|
1589
1597
|
if (_this.isIncrementalRequest) {
|
|
1590
1598
|
ulElement = _this.renderItems(listItems, fields);
|
|
@@ -1622,6 +1630,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1622
1630
|
}
|
|
1623
1631
|
if (_this.isVirtualizationEnabled) {
|
|
1624
1632
|
_this.getFilteringSkeletonCount();
|
|
1633
|
+
_this.updatePopupPosition();
|
|
1625
1634
|
}
|
|
1626
1635
|
if (_this.virtualSelectAll && _this.virtualSelectAllData) {
|
|
1627
1636
|
_this.virtualSelectionAll(_this.virtualSelectAllState, _this.liCollections, _this.CurrentEvent);
|
|
@@ -1663,7 +1672,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1663
1672
|
newQuery.queries[queryElements].e.nos = listItems.count;
|
|
1664
1673
|
listItems = (newQuery).executeLocal(dataManager);
|
|
1665
1674
|
}
|
|
1666
|
-
if (_this.getModuleName() === 'multiselect' && (newQuery.queries[queryElements].e.condition === 'or' || newQuery.queries[queryElements].e.operator === 'equal')) {
|
|
1675
|
+
if (_this.getModuleName() === 'multiselect' && (newQuery.queries[queryElements].e.condition === 'or' || newQuery.queries[queryElements].e.operator === 'equal') && !_this.isCustomFiltering) {
|
|
1667
1676
|
isReOrder = false;
|
|
1668
1677
|
}
|
|
1669
1678
|
}
|
|
@@ -1696,6 +1705,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1696
1705
|
var localDataArgs = { cancel: false, result: listItems };
|
|
1697
1706
|
_this.isPreventChange = _this.isAngular && _this.preventChange ? true : _this.isPreventChange;
|
|
1698
1707
|
_this.trigger('actionComplete', localDataArgs, function (localDataArgs) {
|
|
1708
|
+
_this.isCustomFiltering = false;
|
|
1699
1709
|
if (_this.isIncrementalRequest) {
|
|
1700
1710
|
ulElement = _this.renderItems(localDataArgs.result, fields);
|
|
1701
1711
|
return;
|
|
@@ -1730,6 +1740,9 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1730
1740
|
DropDownBase.prototype.updatePopupState = function () {
|
|
1731
1741
|
// Used this method in component side.
|
|
1732
1742
|
};
|
|
1743
|
+
DropDownBase.prototype.updatePopupPosition = function () {
|
|
1744
|
+
// Used this method in component side.
|
|
1745
|
+
};
|
|
1733
1746
|
DropDownBase.prototype.virtualSelectionAll = function (state, li, event) {
|
|
1734
1747
|
// Used this method in component side.
|
|
1735
1748
|
};
|
|
@@ -9944,6 +9957,9 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
9944
9957
|
}
|
|
9945
9958
|
chip.appendChild(chipContent);
|
|
9946
9959
|
this.chipCollection.appendChild(chip);
|
|
9960
|
+
if (this.isReact) {
|
|
9961
|
+
this.renderReactTemplates();
|
|
9962
|
+
}
|
|
9947
9963
|
};
|
|
9948
9964
|
DropDownTree.prototype.setSelectAllWrapper = function (state) {
|
|
9949
9965
|
if (this.isFirstRender) {
|
|
@@ -10673,6 +10689,9 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
10673
10689
|
addClass([this.inputWrapper], [INPUTFOCUS]);
|
|
10674
10690
|
}
|
|
10675
10691
|
}
|
|
10692
|
+
if (this.isFilteredData) {
|
|
10693
|
+
this.treeObj['treeData'] = this.treeData;
|
|
10694
|
+
}
|
|
10676
10695
|
if (this.destroyPopupOnHide) {
|
|
10677
10696
|
this.isFirstRender = true;
|
|
10678
10697
|
this.destroyPopup();
|
|
@@ -12759,6 +12778,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12759
12778
|
_this.isUpdateFooterHeight = false;
|
|
12760
12779
|
_this.isBlurDispatching = false;
|
|
12761
12780
|
_this.isFilterPrevented = false;
|
|
12781
|
+
_this.isFilteringAction = false;
|
|
12762
12782
|
_this.isValidKey = false;
|
|
12763
12783
|
_this.selectAllEventData = [];
|
|
12764
12784
|
_this.selectAllEventEle = [];
|
|
@@ -13220,7 +13240,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13220
13240
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13221
13241
|
this.totalItemCount = e.count;
|
|
13222
13242
|
}
|
|
13223
|
-
if (this.value && list && list.length > 0 && this.allowFiltering && this.mode !== 'CheckBox' && !this.enableVirtualization && !this.isFilterPrevented && !this.allowCustomValue) {
|
|
13243
|
+
if (this.value && list && list.length > 0 && this.allowFiltering && this.mode !== 'CheckBox' && !this.enableVirtualization && !this.isFilterPrevented && !this.allowCustomValue && this.isFilteringAction) {
|
|
13224
13244
|
var allItemsInValue = list.every(function (item) {
|
|
13225
13245
|
var itemValue = getValue((_this.fields.value) ? _this.fields.value : '', item);
|
|
13226
13246
|
return _this.value.some(function (val) {
|
|
@@ -14240,6 +14260,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14240
14260
|
break;
|
|
14241
14261
|
}
|
|
14242
14262
|
};
|
|
14263
|
+
MultiSelect.prototype.updatePopupPosition = function () {
|
|
14264
|
+
this.refreshPopup();
|
|
14265
|
+
};
|
|
14243
14266
|
MultiSelect.prototype.updateAriaAttribute = function () {
|
|
14244
14267
|
var focusedItem = this.list.querySelector('.' + dropDownBaseClasses.focus);
|
|
14245
14268
|
if (!isNullOrUndefined(focusedItem)) {
|
|
@@ -15889,6 +15912,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15889
15912
|
this.totalItemCount = this.value && this.value.length ? this.totalItemCount - this.value.length : this.totalItemCount;
|
|
15890
15913
|
}
|
|
15891
15914
|
this.getSkeletonCount();
|
|
15915
|
+
this.skeletonCount = this.totalItemCount !== 0 && this.totalItemCount < this.itemCount * 2 &&
|
|
15916
|
+
((!(this.dataSource instanceof DataManager)) || ((this.dataSource instanceof DataManager) &&
|
|
15917
|
+
(this.totalItemCount <= this.itemCount))) ? 0 : this.skeletonCount;
|
|
15892
15918
|
this.UpdateSkeleton();
|
|
15893
15919
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15894
15920
|
if (this.list.getElementsByClassName('e-virtual-ddl')[0]) {
|
|
@@ -16109,6 +16135,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16109
16135
|
_this.isFiltered = true;
|
|
16110
16136
|
_this.customFilterQuery = query;
|
|
16111
16137
|
_this.remoteFilterAction = true;
|
|
16138
|
+
_this.isCustomFiltering = true;
|
|
16112
16139
|
_this.dataUpdater(dataSource, query, fields);
|
|
16113
16140
|
},
|
|
16114
16141
|
event: e,
|
|
@@ -16119,10 +16146,12 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16119
16146
|
if (!eventArgs.cancel) {
|
|
16120
16147
|
if (!_this.isFiltered && !eventArgs.preventDefaultAction) {
|
|
16121
16148
|
_this.filterAction = true;
|
|
16149
|
+
_this.isFilteringAction = true;
|
|
16122
16150
|
if (_this.dataSource instanceof DataManager && _this.allowCustomValue) {
|
|
16123
16151
|
_this.isCustomRendered = false;
|
|
16124
16152
|
}
|
|
16125
16153
|
_this.dataUpdater(_this.dataSource, null, _this.fields);
|
|
16154
|
+
_this.isFilteringAction = false;
|
|
16126
16155
|
}
|
|
16127
16156
|
}
|
|
16128
16157
|
});
|
|
@@ -19785,6 +19814,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
19785
19814
|
function ListBox(options, element) {
|
|
19786
19815
|
var _this = _super.call(this, options, element) || this;
|
|
19787
19816
|
_this.isValidKey = false;
|
|
19817
|
+
_this.isBackSpace = false;
|
|
19788
19818
|
_this.isDataSourceUpdate = false;
|
|
19789
19819
|
_this.keyDownStatus = false;
|
|
19790
19820
|
return _this;
|
|
@@ -20053,6 +20083,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
20053
20083
|
}
|
|
20054
20084
|
};
|
|
20055
20085
|
ListBox.prototype.onActionComplete = function (ulElement, list, e) {
|
|
20086
|
+
var _this = this;
|
|
20056
20087
|
var searchEle;
|
|
20057
20088
|
var filterElem;
|
|
20058
20089
|
var txtLength;
|
|
@@ -20119,8 +20150,9 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
20119
20150
|
}
|
|
20120
20151
|
filterElem.selectionStart = txtLength;
|
|
20121
20152
|
filterElem.selectionEnd = txtLength;
|
|
20122
|
-
if (filterElem.value !== '') {
|
|
20153
|
+
if (filterElem.value !== '' || (filterElem.value === '' && this.isBackSpace)) {
|
|
20123
20154
|
filterElem.focus();
|
|
20155
|
+
setTimeout(function () { _this.isBackSpace = false; });
|
|
20124
20156
|
}
|
|
20125
20157
|
}
|
|
20126
20158
|
}
|
|
@@ -21725,7 +21757,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
21725
21757
|
};
|
|
21726
21758
|
ListBox.prototype.KeyUp = function (e) {
|
|
21727
21759
|
var _this = this;
|
|
21728
|
-
if (this.allowFiltering &&
|
|
21760
|
+
if (this.allowFiltering && e.ctrlKey && e.keyCode === 65) {
|
|
21729
21761
|
e.preventDefault();
|
|
21730
21762
|
return;
|
|
21731
21763
|
}
|
|
@@ -21734,6 +21766,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
21734
21766
|
if (!isNullOrUndefined(isWordCharacter)) {
|
|
21735
21767
|
this.isValidKey = true;
|
|
21736
21768
|
}
|
|
21769
|
+
this.isBackSpace = e.keyCode === 8;
|
|
21737
21770
|
this.isValidKey = (e.keyCode === 8) || (e.keyCode === 46) || this.isValidKey;
|
|
21738
21771
|
if (this.isValidKey) {
|
|
21739
21772
|
this.isValidKey = false;
|