@syncfusion/ej2-dropdowns 28.2.3 → 28.2.5
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 +39 -11
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +40 -11
- 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/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-list/drop-down-list.js +3 -1
- package/src/drop-down-tree/drop-down-tree.js +18 -6
- 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 +1 -0
- package/src/multi-select/multi-select.js +4 -0
|
@@ -901,6 +901,7 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
901
901
|
this.CurrentEvent = null;
|
|
902
902
|
this.isDynamicData = false;
|
|
903
903
|
this.isPrimitiveData = false;
|
|
904
|
+
this.isCustomFiltering = false;
|
|
904
905
|
this.virtualListInfo = {
|
|
905
906
|
currentPageNumber: null,
|
|
906
907
|
direction: null,
|
|
@@ -1483,7 +1484,7 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1483
1484
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1484
1485
|
newQuery.queries[queryElements].e.nos = e.count;
|
|
1485
1486
|
}
|
|
1486
|
-
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) {
|
|
1487
1488
|
isReOrder = false;
|
|
1488
1489
|
}
|
|
1489
1490
|
}
|
|
@@ -1507,6 +1508,7 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1507
1508
|
this.trigger('actionComplete', e, (e) => {
|
|
1508
1509
|
if (!e.cancel) {
|
|
1509
1510
|
this.isRequesting = false;
|
|
1511
|
+
this.isCustomFiltering = false;
|
|
1510
1512
|
const listItems = e.result;
|
|
1511
1513
|
if (this.isIncrementalRequest) {
|
|
1512
1514
|
ulElement = this.renderItems(listItems, fields);
|
|
@@ -1544,6 +1546,7 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1544
1546
|
}
|
|
1545
1547
|
if (this.isVirtualizationEnabled) {
|
|
1546
1548
|
this.getFilteringSkeletonCount();
|
|
1549
|
+
this.updatePopupPosition();
|
|
1547
1550
|
}
|
|
1548
1551
|
if (this.virtualSelectAll && this.virtualSelectAllData) {
|
|
1549
1552
|
this.virtualSelectionAll(this.virtualSelectAllState, this.liCollections, this.CurrentEvent);
|
|
@@ -1585,7 +1588,7 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1585
1588
|
newQuery.queries[queryElements].e.nos = listItems.count;
|
|
1586
1589
|
listItems = (newQuery).executeLocal(dataManager);
|
|
1587
1590
|
}
|
|
1588
|
-
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) {
|
|
1589
1592
|
isReOrder = false;
|
|
1590
1593
|
}
|
|
1591
1594
|
}
|
|
@@ -1618,6 +1621,7 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1618
1621
|
const localDataArgs = { cancel: false, result: listItems };
|
|
1619
1622
|
this.isPreventChange = this.isAngular && this.preventChange ? true : this.isPreventChange;
|
|
1620
1623
|
this.trigger('actionComplete', localDataArgs, (localDataArgs) => {
|
|
1624
|
+
this.isCustomFiltering = false;
|
|
1621
1625
|
if (this.isIncrementalRequest) {
|
|
1622
1626
|
ulElement = this.renderItems(localDataArgs.result, fields);
|
|
1623
1627
|
return;
|
|
@@ -1652,6 +1656,9 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1652
1656
|
updatePopupState() {
|
|
1653
1657
|
// Used this method in component side.
|
|
1654
1658
|
}
|
|
1659
|
+
updatePopupPosition() {
|
|
1660
|
+
// Used this method in component side.
|
|
1661
|
+
}
|
|
1655
1662
|
virtualSelectionAll(state, li, event) {
|
|
1656
1663
|
// Used this method in component side.
|
|
1657
1664
|
}
|
|
@@ -5292,6 +5299,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5292
5299
|
}
|
|
5293
5300
|
const args = { cancel: false };
|
|
5294
5301
|
this.trigger('beforeOpen', args, (args) => {
|
|
5302
|
+
let initialPopupHeight;
|
|
5295
5303
|
if (!args.cancel) {
|
|
5296
5304
|
const popupEle = this.createElement('div', {
|
|
5297
5305
|
id: this.element.id + '_popup', className: 'e-ddl e-popup ' + (this.cssClass !== null ? this.cssClass : '')
|
|
@@ -5312,6 +5320,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5312
5320
|
}
|
|
5313
5321
|
document.body.appendChild(popupEle);
|
|
5314
5322
|
popupEle.style.top = '0px';
|
|
5323
|
+
initialPopupHeight = popupEle.clientHeight;
|
|
5315
5324
|
if (this.enableVirtualization && this.itemTemplate) {
|
|
5316
5325
|
const listitems = popupEle.querySelectorAll('li.e-list-item:not(.e-virtual-list)');
|
|
5317
5326
|
this.listItemHeight = listitems.length > 0 ? Math.ceil(listitems[0].getBoundingClientRect().height) +
|
|
@@ -5508,7 +5517,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5508
5517
|
// Add the resizer div to the popup
|
|
5509
5518
|
if (this.list && this.list.parentElement) {
|
|
5510
5519
|
this.list.parentElement.classList.add('e-resize');
|
|
5511
|
-
if (this.popupHeight.toString().toLowerCase() !== 'auto') {
|
|
5520
|
+
if (this.popupHeight.toString().toLowerCase() !== 'auto' && initialPopupHeight > parseInt(this.popupHeight.toString(), 10)) {
|
|
5512
5521
|
this.list.parentElement.style.height = '100%';
|
|
5513
5522
|
}
|
|
5514
5523
|
this.list.parentElement.style.paddingBottom = (this.getModuleName() === 'dropdownlist' && this.allowFiltering && this.searchBoxHeight) ? (this.searchBoxHeight + resizePaddingBottom).toString() + 'px' : resizePaddingBottom.toString() + 'px';
|
|
@@ -8489,7 +8498,7 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
8489
8498
|
this.inputEle.setAttribute('aria-label', this.getModuleName());
|
|
8490
8499
|
const id = this.element.getAttribute('id');
|
|
8491
8500
|
this.hiddenElement.id = id + '_hidden';
|
|
8492
|
-
this.inputWrapper.setAttribute('tabindex', '0');
|
|
8501
|
+
this.inputWrapper.setAttribute('tabindex', this.inputWrapper.classList.contains('e-disabled') ? '-1' : '0');
|
|
8493
8502
|
this.inputWrapper.setAttribute('aria-label', this.getModuleName());
|
|
8494
8503
|
attributes(this.inputWrapper, this.getAriaAttributes());
|
|
8495
8504
|
}
|
|
@@ -8849,9 +8858,11 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
8849
8858
|
removeClass([this.popupEle], DDTHIDEICON);
|
|
8850
8859
|
this.updatePopupHeight();
|
|
8851
8860
|
this.popupObj.refreshPosition();
|
|
8852
|
-
if (
|
|
8853
|
-
|
|
8854
|
-
|
|
8861
|
+
if (this.showSelectAll && !this.allowFiltering) {
|
|
8862
|
+
this.checkAllParent.focus();
|
|
8863
|
+
}
|
|
8864
|
+
if ((!this.popupDiv.classList.contains(NODATA) && this.treeItems.length > 0)) {
|
|
8865
|
+
let focusedElement = this.value != null || this.text != null ? this.treeObj.element.querySelector('[data-uid="' + this.value[0] + '"]') : null;
|
|
8855
8866
|
if (focusedElement) {
|
|
8856
8867
|
this.treeObj.element.querySelector('li').setAttribute('tabindex', '-1');
|
|
8857
8868
|
focusedElement.setAttribute('tabindex', '0');
|
|
@@ -9190,7 +9201,9 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
9190
9201
|
this.updateTemplate();
|
|
9191
9202
|
}
|
|
9192
9203
|
this.treeObj.fields = this.getTreeFields(this.fields);
|
|
9204
|
+
this.setProperties({ value: this.oldValue }, true);
|
|
9193
9205
|
this.treeObj.dataBind();
|
|
9206
|
+
this.updateValue(this.value);
|
|
9194
9207
|
}
|
|
9195
9208
|
getEventArgs(args) {
|
|
9196
9209
|
const checkData = args.data;
|
|
@@ -9759,6 +9772,9 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
9759
9772
|
}
|
|
9760
9773
|
chip.appendChild(chipContent);
|
|
9761
9774
|
this.chipCollection.appendChild(chip);
|
|
9775
|
+
if (this.isReact) {
|
|
9776
|
+
this.renderReactTemplates();
|
|
9777
|
+
}
|
|
9762
9778
|
}
|
|
9763
9779
|
setSelectAllWrapper(state) {
|
|
9764
9780
|
if (this.isFirstRender) {
|
|
@@ -10198,8 +10214,10 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
10198
10214
|
this.updateFilterPlaceHolder();
|
|
10199
10215
|
break;
|
|
10200
10216
|
case 'value':
|
|
10201
|
-
|
|
10202
|
-
|
|
10217
|
+
if (JSON.stringify(oldProp.value) !== JSON.stringify(newProp.value)) {
|
|
10218
|
+
this.oldValue = oldProp.value;
|
|
10219
|
+
this.updateValue(newProp.value);
|
|
10220
|
+
}
|
|
10203
10221
|
break;
|
|
10204
10222
|
case 'text':
|
|
10205
10223
|
this.updateText(newProp.text);
|
|
@@ -10485,6 +10503,9 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
10485
10503
|
addClass([this.inputWrapper], [INPUTFOCUS]);
|
|
10486
10504
|
}
|
|
10487
10505
|
}
|
|
10506
|
+
if (this.isFilteredData) {
|
|
10507
|
+
this.treeObj['treeData'] = this.treeData;
|
|
10508
|
+
}
|
|
10488
10509
|
if (this.destroyPopupOnHide) {
|
|
10489
10510
|
this.isFirstRender = true;
|
|
10490
10511
|
this.destroyPopup();
|
|
@@ -13994,6 +14015,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
13994
14015
|
break;
|
|
13995
14016
|
}
|
|
13996
14017
|
}
|
|
14018
|
+
updatePopupPosition() {
|
|
14019
|
+
this.refreshPopup();
|
|
14020
|
+
}
|
|
13997
14021
|
updateAriaAttribute() {
|
|
13998
14022
|
const focusedItem = this.list.querySelector('.' + dropDownBaseClasses.focus);
|
|
13999
14023
|
if (!isNullOrUndefined(focusedItem)) {
|
|
@@ -15850,6 +15874,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
15850
15874
|
this.isFiltered = true;
|
|
15851
15875
|
this.customFilterQuery = query;
|
|
15852
15876
|
this.remoteFilterAction = true;
|
|
15877
|
+
this.isCustomFiltering = true;
|
|
15853
15878
|
this.dataUpdater(dataSource, query, fields);
|
|
15854
15879
|
},
|
|
15855
15880
|
event: e,
|
|
@@ -19479,6 +19504,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
19479
19504
|
constructor(options, element) {
|
|
19480
19505
|
super(options, element);
|
|
19481
19506
|
this.isValidKey = false;
|
|
19507
|
+
this.isBackSpace = false;
|
|
19482
19508
|
this.isDataSourceUpdate = false;
|
|
19483
19509
|
this.keyDownStatus = false;
|
|
19484
19510
|
}
|
|
@@ -19809,8 +19835,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
19809
19835
|
}
|
|
19810
19836
|
filterElem.selectionStart = txtLength;
|
|
19811
19837
|
filterElem.selectionEnd = txtLength;
|
|
19812
|
-
if (filterElem.value !== '') {
|
|
19838
|
+
if (filterElem.value !== '' || (filterElem.value === '' && this.isBackSpace)) {
|
|
19813
19839
|
filterElem.focus();
|
|
19840
|
+
setTimeout(() => { this.isBackSpace = false; });
|
|
19814
19841
|
}
|
|
19815
19842
|
}
|
|
19816
19843
|
}
|
|
@@ -21388,7 +21415,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
21388
21415
|
}
|
|
21389
21416
|
}
|
|
21390
21417
|
KeyUp(e) {
|
|
21391
|
-
if (this.allowFiltering &&
|
|
21418
|
+
if (this.allowFiltering && e.ctrlKey && e.keyCode === 65) {
|
|
21392
21419
|
e.preventDefault();
|
|
21393
21420
|
return;
|
|
21394
21421
|
}
|
|
@@ -21397,6 +21424,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
21397
21424
|
if (!isNullOrUndefined(isWordCharacter)) {
|
|
21398
21425
|
this.isValidKey = true;
|
|
21399
21426
|
}
|
|
21427
|
+
this.isBackSpace = e.keyCode === 8;
|
|
21400
21428
|
this.isValidKey = (e.keyCode === 8) || (e.keyCode === 46) || this.isValidKey;
|
|
21401
21429
|
if (this.isValidKey) {
|
|
21402
21430
|
this.isValidKey = false;
|