@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
|
@@ -401,7 +401,7 @@ class VirtualScroll {
|
|
|
401
401
|
endIndex = this.parent.viewPortInfo.endIndex - this.parent.value.length;
|
|
402
402
|
if (this.parent.viewPortInfo.startIndex === 0) {
|
|
403
403
|
this.parent.updateVirtualReOrderList(true);
|
|
404
|
-
if (this.parent.value.length < this.parent.itemCount) {
|
|
404
|
+
if (this.parent.value.length < this.parent.itemCount && this.parent.value.length !== this.parent.totalItemCount) {
|
|
405
405
|
const oldUlElement = this.parent.list.querySelector('.e-list-parent' + ':not(.e-reorder)');
|
|
406
406
|
if (oldUlElement) {
|
|
407
407
|
this.parent.list.querySelector('.e-virtual-ddl-content').removeChild(oldUlElement);
|
|
@@ -464,6 +464,12 @@ class VirtualScroll {
|
|
|
464
464
|
if (isListUpdated) {
|
|
465
465
|
for (let i = this.parent.viewPortInfo.startIndex; i < endIndex; i++) {
|
|
466
466
|
const index = i;
|
|
467
|
+
if (this.component === 'multiselect' && this.parent.mode === 'CheckBox') {
|
|
468
|
+
const oldUlElement = this.parent.list.querySelector('.e-list-parent' + '.e-reorder');
|
|
469
|
+
if (oldUlElement) {
|
|
470
|
+
this.parent.list.querySelector('.e-virtual-ddl-content').removeChild(oldUlElement);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
467
473
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
468
474
|
const alreadyAddedData = this.parent.generatedDataObject[index];
|
|
469
475
|
if (this.component === 'multiselect' && this.parent.hideSelectedItem) {
|
|
@@ -895,6 +901,7 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
895
901
|
this.CurrentEvent = null;
|
|
896
902
|
this.isDynamicData = false;
|
|
897
903
|
this.isPrimitiveData = false;
|
|
904
|
+
this.isCustomFiltering = false;
|
|
898
905
|
this.virtualListInfo = {
|
|
899
906
|
currentPageNumber: null,
|
|
900
907
|
direction: null,
|
|
@@ -1477,7 +1484,7 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1477
1484
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1478
1485
|
newQuery.queries[queryElements].e.nos = e.count;
|
|
1479
1486
|
}
|
|
1480
|
-
if (this.getModuleName() === 'multiselect' && (newQuery.queries[queryElements].e.condition === 'or' || newQuery.queries[queryElements].e.operator === 'equal')) {
|
|
1487
|
+
if (this.getModuleName() === 'multiselect' && (newQuery.queries[queryElements].e.condition === 'or' || newQuery.queries[queryElements].e.operator === 'equal') && !this.isCustomFiltering) {
|
|
1481
1488
|
isReOrder = false;
|
|
1482
1489
|
}
|
|
1483
1490
|
}
|
|
@@ -1501,6 +1508,7 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1501
1508
|
this.trigger('actionComplete', e, (e) => {
|
|
1502
1509
|
if (!e.cancel) {
|
|
1503
1510
|
this.isRequesting = false;
|
|
1511
|
+
this.isCustomFiltering = false;
|
|
1504
1512
|
const listItems = e.result;
|
|
1505
1513
|
if (this.isIncrementalRequest) {
|
|
1506
1514
|
ulElement = this.renderItems(listItems, fields);
|
|
@@ -1538,6 +1546,7 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1538
1546
|
}
|
|
1539
1547
|
if (this.isVirtualizationEnabled) {
|
|
1540
1548
|
this.getFilteringSkeletonCount();
|
|
1549
|
+
this.updatePopupPosition();
|
|
1541
1550
|
}
|
|
1542
1551
|
if (this.virtualSelectAll && this.virtualSelectAllData) {
|
|
1543
1552
|
this.virtualSelectionAll(this.virtualSelectAllState, this.liCollections, this.CurrentEvent);
|
|
@@ -1579,7 +1588,7 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1579
1588
|
newQuery.queries[queryElements].e.nos = listItems.count;
|
|
1580
1589
|
listItems = (newQuery).executeLocal(dataManager);
|
|
1581
1590
|
}
|
|
1582
|
-
if (this.getModuleName() === 'multiselect' && (newQuery.queries[queryElements].e.condition === 'or' || newQuery.queries[queryElements].e.operator === 'equal')) {
|
|
1591
|
+
if (this.getModuleName() === 'multiselect' && (newQuery.queries[queryElements].e.condition === 'or' || newQuery.queries[queryElements].e.operator === 'equal') && !this.isCustomFiltering) {
|
|
1583
1592
|
isReOrder = false;
|
|
1584
1593
|
}
|
|
1585
1594
|
}
|
|
@@ -1612,6 +1621,7 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1612
1621
|
const localDataArgs = { cancel: false, result: listItems };
|
|
1613
1622
|
this.isPreventChange = this.isAngular && this.preventChange ? true : this.isPreventChange;
|
|
1614
1623
|
this.trigger('actionComplete', localDataArgs, (localDataArgs) => {
|
|
1624
|
+
this.isCustomFiltering = false;
|
|
1615
1625
|
if (this.isIncrementalRequest) {
|
|
1616
1626
|
ulElement = this.renderItems(localDataArgs.result, fields);
|
|
1617
1627
|
return;
|
|
@@ -1646,6 +1656,9 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1646
1656
|
updatePopupState() {
|
|
1647
1657
|
// Used this method in component side.
|
|
1648
1658
|
}
|
|
1659
|
+
updatePopupPosition() {
|
|
1660
|
+
// Used this method in component side.
|
|
1661
|
+
}
|
|
1649
1662
|
virtualSelectionAll(state, li, event) {
|
|
1650
1663
|
// Used this method in component side.
|
|
1651
1664
|
}
|
|
@@ -9753,6 +9766,9 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
9753
9766
|
}
|
|
9754
9767
|
chip.appendChild(chipContent);
|
|
9755
9768
|
this.chipCollection.appendChild(chip);
|
|
9769
|
+
if (this.isReact) {
|
|
9770
|
+
this.renderReactTemplates();
|
|
9771
|
+
}
|
|
9756
9772
|
}
|
|
9757
9773
|
setSelectAllWrapper(state) {
|
|
9758
9774
|
if (this.isFirstRender) {
|
|
@@ -10479,6 +10495,9 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
10479
10495
|
addClass([this.inputWrapper], [INPUTFOCUS]);
|
|
10480
10496
|
}
|
|
10481
10497
|
}
|
|
10498
|
+
if (this.isFilteredData) {
|
|
10499
|
+
this.treeObj['treeData'] = this.treeData;
|
|
10500
|
+
}
|
|
10482
10501
|
if (this.destroyPopupOnHide) {
|
|
10483
10502
|
this.isFirstRender = true;
|
|
10484
10503
|
this.destroyPopup();
|
|
@@ -12511,6 +12530,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
12511
12530
|
this.isUpdateFooterHeight = false;
|
|
12512
12531
|
this.isBlurDispatching = false;
|
|
12513
12532
|
this.isFilterPrevented = false;
|
|
12533
|
+
this.isFilteringAction = false;
|
|
12514
12534
|
this.isValidKey = false;
|
|
12515
12535
|
this.selectAllEventData = [];
|
|
12516
12536
|
this.selectAllEventEle = [];
|
|
@@ -12968,7 +12988,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
12968
12988
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12969
12989
|
this.totalItemCount = e.count;
|
|
12970
12990
|
}
|
|
12971
|
-
if (this.value && list && list.length > 0 && this.allowFiltering && this.mode !== 'CheckBox' && !this.enableVirtualization && !this.isFilterPrevented && !this.allowCustomValue) {
|
|
12991
|
+
if (this.value && list && list.length > 0 && this.allowFiltering && this.mode !== 'CheckBox' && !this.enableVirtualization && !this.isFilterPrevented && !this.allowCustomValue && this.isFilteringAction) {
|
|
12972
12992
|
const allItemsInValue = list.every((item) => {
|
|
12973
12993
|
const itemValue = getValue((this.fields.value) ? this.fields.value : '', item);
|
|
12974
12994
|
return this.value.some((val) => {
|
|
@@ -13987,6 +14007,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
13987
14007
|
break;
|
|
13988
14008
|
}
|
|
13989
14009
|
}
|
|
14010
|
+
updatePopupPosition() {
|
|
14011
|
+
this.refreshPopup();
|
|
14012
|
+
}
|
|
13990
14013
|
updateAriaAttribute() {
|
|
13991
14014
|
const focusedItem = this.list.querySelector('.' + dropDownBaseClasses.focus);
|
|
13992
14015
|
if (!isNullOrUndefined(focusedItem)) {
|
|
@@ -15622,6 +15645,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
15622
15645
|
this.totalItemCount = this.value && this.value.length ? this.totalItemCount - this.value.length : this.totalItemCount;
|
|
15623
15646
|
}
|
|
15624
15647
|
this.getSkeletonCount();
|
|
15648
|
+
this.skeletonCount = this.totalItemCount !== 0 && this.totalItemCount < this.itemCount * 2 &&
|
|
15649
|
+
((!(this.dataSource instanceof DataManager)) || ((this.dataSource instanceof DataManager) &&
|
|
15650
|
+
(this.totalItemCount <= this.itemCount))) ? 0 : this.skeletonCount;
|
|
15625
15651
|
this.UpdateSkeleton();
|
|
15626
15652
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15627
15653
|
if (this.list.getElementsByClassName('e-virtual-ddl')[0]) {
|
|
@@ -15840,6 +15866,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
15840
15866
|
this.isFiltered = true;
|
|
15841
15867
|
this.customFilterQuery = query;
|
|
15842
15868
|
this.remoteFilterAction = true;
|
|
15869
|
+
this.isCustomFiltering = true;
|
|
15843
15870
|
this.dataUpdater(dataSource, query, fields);
|
|
15844
15871
|
},
|
|
15845
15872
|
event: e,
|
|
@@ -15850,10 +15877,12 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
15850
15877
|
if (!eventArgs.cancel) {
|
|
15851
15878
|
if (!this.isFiltered && !eventArgs.preventDefaultAction) {
|
|
15852
15879
|
this.filterAction = true;
|
|
15880
|
+
this.isFilteringAction = true;
|
|
15853
15881
|
if (this.dataSource instanceof DataManager && this.allowCustomValue) {
|
|
15854
15882
|
this.isCustomRendered = false;
|
|
15855
15883
|
}
|
|
15856
15884
|
this.dataUpdater(this.dataSource, null, this.fields);
|
|
15885
|
+
this.isFilteringAction = false;
|
|
15857
15886
|
}
|
|
15858
15887
|
}
|
|
15859
15888
|
});
|
|
@@ -19467,6 +19496,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
19467
19496
|
constructor(options, element) {
|
|
19468
19497
|
super(options, element);
|
|
19469
19498
|
this.isValidKey = false;
|
|
19499
|
+
this.isBackSpace = false;
|
|
19470
19500
|
this.isDataSourceUpdate = false;
|
|
19471
19501
|
this.keyDownStatus = false;
|
|
19472
19502
|
}
|
|
@@ -19797,8 +19827,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
19797
19827
|
}
|
|
19798
19828
|
filterElem.selectionStart = txtLength;
|
|
19799
19829
|
filterElem.selectionEnd = txtLength;
|
|
19800
|
-
if (filterElem.value !== '') {
|
|
19830
|
+
if (filterElem.value !== '' || (filterElem.value === '' && this.isBackSpace)) {
|
|
19801
19831
|
filterElem.focus();
|
|
19832
|
+
setTimeout(() => { this.isBackSpace = false; });
|
|
19802
19833
|
}
|
|
19803
19834
|
}
|
|
19804
19835
|
}
|
|
@@ -21376,7 +21407,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
21376
21407
|
}
|
|
21377
21408
|
}
|
|
21378
21409
|
KeyUp(e) {
|
|
21379
|
-
if (this.allowFiltering &&
|
|
21410
|
+
if (this.allowFiltering && e.ctrlKey && e.keyCode === 65) {
|
|
21380
21411
|
e.preventDefault();
|
|
21381
21412
|
return;
|
|
21382
21413
|
}
|
|
@@ -21385,6 +21416,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
21385
21416
|
if (!isNullOrUndefined(isWordCharacter)) {
|
|
21386
21417
|
this.isValidKey = true;
|
|
21387
21418
|
}
|
|
21419
|
+
this.isBackSpace = e.keyCode === 8;
|
|
21388
21420
|
this.isValidKey = (e.keyCode === 8) || (e.keyCode === 46) || this.isValidKey;
|
|
21389
21421
|
if (this.isValidKey) {
|
|
21390
21422
|
this.isValidKey = false;
|