@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
|
@@ -979,6 +979,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
979
979
|
_this.CurrentEvent = null;
|
|
980
980
|
_this.isDynamicData = false;
|
|
981
981
|
_this.isPrimitiveData = false;
|
|
982
|
+
_this.isCustomFiltering = false;
|
|
982
983
|
_this.virtualListInfo = {
|
|
983
984
|
currentPageNumber: null,
|
|
984
985
|
direction: null,
|
|
@@ -1567,7 +1568,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1567
1568
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1568
1569
|
newQuery.queries[queryElements].e.nos = e.count;
|
|
1569
1570
|
}
|
|
1570
|
-
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) {
|
|
1571
1572
|
isReOrder = false;
|
|
1572
1573
|
}
|
|
1573
1574
|
}
|
|
@@ -1591,6 +1592,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1591
1592
|
_this.trigger('actionComplete', e, function (e) {
|
|
1592
1593
|
if (!e.cancel) {
|
|
1593
1594
|
_this.isRequesting = false;
|
|
1595
|
+
_this.isCustomFiltering = false;
|
|
1594
1596
|
var listItems = e.result;
|
|
1595
1597
|
if (_this.isIncrementalRequest) {
|
|
1596
1598
|
ulElement = _this.renderItems(listItems, fields);
|
|
@@ -1628,6 +1630,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1628
1630
|
}
|
|
1629
1631
|
if (_this.isVirtualizationEnabled) {
|
|
1630
1632
|
_this.getFilteringSkeletonCount();
|
|
1633
|
+
_this.updatePopupPosition();
|
|
1631
1634
|
}
|
|
1632
1635
|
if (_this.virtualSelectAll && _this.virtualSelectAllData) {
|
|
1633
1636
|
_this.virtualSelectionAll(_this.virtualSelectAllState, _this.liCollections, _this.CurrentEvent);
|
|
@@ -1669,7 +1672,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1669
1672
|
newQuery.queries[queryElements].e.nos = listItems.count;
|
|
1670
1673
|
listItems = (newQuery).executeLocal(dataManager);
|
|
1671
1674
|
}
|
|
1672
|
-
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) {
|
|
1673
1676
|
isReOrder = false;
|
|
1674
1677
|
}
|
|
1675
1678
|
}
|
|
@@ -1702,6 +1705,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1702
1705
|
var localDataArgs = { cancel: false, result: listItems };
|
|
1703
1706
|
_this.isPreventChange = _this.isAngular && _this.preventChange ? true : _this.isPreventChange;
|
|
1704
1707
|
_this.trigger('actionComplete', localDataArgs, function (localDataArgs) {
|
|
1708
|
+
_this.isCustomFiltering = false;
|
|
1705
1709
|
if (_this.isIncrementalRequest) {
|
|
1706
1710
|
ulElement = _this.renderItems(localDataArgs.result, fields);
|
|
1707
1711
|
return;
|
|
@@ -1736,6 +1740,9 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1736
1740
|
DropDownBase.prototype.updatePopupState = function () {
|
|
1737
1741
|
// Used this method in component side.
|
|
1738
1742
|
};
|
|
1743
|
+
DropDownBase.prototype.updatePopupPosition = function () {
|
|
1744
|
+
// Used this method in component side.
|
|
1745
|
+
};
|
|
1739
1746
|
DropDownBase.prototype.virtualSelectionAll = function (state, li, event) {
|
|
1740
1747
|
// Used this method in component side.
|
|
1741
1748
|
};
|
|
@@ -5413,6 +5420,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5413
5420
|
}
|
|
5414
5421
|
var args = { cancel: false };
|
|
5415
5422
|
this.trigger('beforeOpen', args, function (args) {
|
|
5423
|
+
var initialPopupHeight;
|
|
5416
5424
|
if (!args.cancel) {
|
|
5417
5425
|
var popupEle = _this.createElement('div', {
|
|
5418
5426
|
id: _this.element.id + '_popup', className: 'e-ddl e-popup ' + (_this.cssClass !== null ? _this.cssClass : '')
|
|
@@ -5433,6 +5441,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5433
5441
|
}
|
|
5434
5442
|
document.body.appendChild(popupEle);
|
|
5435
5443
|
popupEle.style.top = '0px';
|
|
5444
|
+
initialPopupHeight = popupEle.clientHeight;
|
|
5436
5445
|
if (_this.enableVirtualization && _this.itemTemplate) {
|
|
5437
5446
|
var listitems = popupEle.querySelectorAll('li.e-list-item:not(.e-virtual-list)');
|
|
5438
5447
|
_this.listItemHeight = listitems.length > 0 ? Math.ceil(listitems[0].getBoundingClientRect().height) +
|
|
@@ -5630,7 +5639,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5630
5639
|
// Add the resizer div to the popup
|
|
5631
5640
|
if (_this.list && _this.list.parentElement) {
|
|
5632
5641
|
_this.list.parentElement.classList.add('e-resize');
|
|
5633
|
-
if (_this.popupHeight.toString().toLowerCase() !== 'auto') {
|
|
5642
|
+
if (_this.popupHeight.toString().toLowerCase() !== 'auto' && initialPopupHeight > parseInt(_this.popupHeight.toString(), 10)) {
|
|
5634
5643
|
_this.list.parentElement.style.height = '100%';
|
|
5635
5644
|
}
|
|
5636
5645
|
_this.list.parentElement.style.paddingBottom = (_this.getModuleName() === 'dropdownlist' && _this.allowFiltering && _this.searchBoxHeight) ? (_this.searchBoxHeight + resizePaddingBottom).toString() + 'px' : resizePaddingBottom.toString() + 'px';
|
|
@@ -8666,7 +8675,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8666
8675
|
this.inputEle.setAttribute('aria-label', this.getModuleName());
|
|
8667
8676
|
var id = this.element.getAttribute('id');
|
|
8668
8677
|
this.hiddenElement.id = id + '_hidden';
|
|
8669
|
-
this.inputWrapper.setAttribute('tabindex', '0');
|
|
8678
|
+
this.inputWrapper.setAttribute('tabindex', this.inputWrapper.classList.contains('e-disabled') ? '-1' : '0');
|
|
8670
8679
|
this.inputWrapper.setAttribute('aria-label', this.getModuleName());
|
|
8671
8680
|
attributes(this.inputWrapper, this.getAriaAttributes());
|
|
8672
8681
|
};
|
|
@@ -9034,9 +9043,11 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
9034
9043
|
removeClass([_this.popupEle], DDTHIDEICON);
|
|
9035
9044
|
_this.updatePopupHeight();
|
|
9036
9045
|
_this.popupObj.refreshPosition();
|
|
9037
|
-
if (
|
|
9038
|
-
|
|
9039
|
-
|
|
9046
|
+
if (_this.showSelectAll && !_this.allowFiltering) {
|
|
9047
|
+
_this.checkAllParent.focus();
|
|
9048
|
+
}
|
|
9049
|
+
if ((!_this.popupDiv.classList.contains(NODATA) && _this.treeItems.length > 0)) {
|
|
9050
|
+
var focusedElement = _this.value != null || _this.text != null ? _this.treeObj.element.querySelector('[data-uid="' + _this.value[0] + '"]') : null;
|
|
9040
9051
|
if (focusedElement) {
|
|
9041
9052
|
_this.treeObj.element.querySelector('li').setAttribute('tabindex', '-1');
|
|
9042
9053
|
focusedElement.setAttribute('tabindex', '0');
|
|
@@ -9376,7 +9387,9 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
9376
9387
|
this.updateTemplate();
|
|
9377
9388
|
}
|
|
9378
9389
|
this.treeObj.fields = this.getTreeFields(this.fields);
|
|
9390
|
+
this.setProperties({ value: this.oldValue }, true);
|
|
9379
9391
|
this.treeObj.dataBind();
|
|
9392
|
+
this.updateValue(this.value);
|
|
9380
9393
|
};
|
|
9381
9394
|
DropDownTree.prototype.getEventArgs = function (args) {
|
|
9382
9395
|
var checkData = args.data;
|
|
@@ -9950,6 +9963,9 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
9950
9963
|
}
|
|
9951
9964
|
chip.appendChild(chipContent);
|
|
9952
9965
|
this.chipCollection.appendChild(chip);
|
|
9966
|
+
if (this.isReact) {
|
|
9967
|
+
this.renderReactTemplates();
|
|
9968
|
+
}
|
|
9953
9969
|
};
|
|
9954
9970
|
DropDownTree.prototype.setSelectAllWrapper = function (state) {
|
|
9955
9971
|
if (this.isFirstRender) {
|
|
@@ -10390,8 +10406,10 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
10390
10406
|
this.updateFilterPlaceHolder();
|
|
10391
10407
|
break;
|
|
10392
10408
|
case 'value':
|
|
10393
|
-
|
|
10394
|
-
|
|
10409
|
+
if (JSON.stringify(oldProp.value) !== JSON.stringify(newProp.value)) {
|
|
10410
|
+
this.oldValue = oldProp.value;
|
|
10411
|
+
this.updateValue(newProp.value);
|
|
10412
|
+
}
|
|
10395
10413
|
break;
|
|
10396
10414
|
case 'text':
|
|
10397
10415
|
this.updateText(newProp.text);
|
|
@@ -10679,6 +10697,9 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
10679
10697
|
addClass([this.inputWrapper], [INPUTFOCUS]);
|
|
10680
10698
|
}
|
|
10681
10699
|
}
|
|
10700
|
+
if (this.isFilteredData) {
|
|
10701
|
+
this.treeObj['treeData'] = this.treeData;
|
|
10702
|
+
}
|
|
10682
10703
|
if (this.destroyPopupOnHide) {
|
|
10683
10704
|
this.isFirstRender = true;
|
|
10684
10705
|
this.destroyPopup();
|
|
@@ -14247,6 +14268,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14247
14268
|
break;
|
|
14248
14269
|
}
|
|
14249
14270
|
};
|
|
14271
|
+
MultiSelect.prototype.updatePopupPosition = function () {
|
|
14272
|
+
this.refreshPopup();
|
|
14273
|
+
};
|
|
14250
14274
|
MultiSelect.prototype.updateAriaAttribute = function () {
|
|
14251
14275
|
var focusedItem = this.list.querySelector('.' + dropDownBaseClasses.focus);
|
|
14252
14276
|
if (!isNullOrUndefined(focusedItem)) {
|
|
@@ -16119,6 +16143,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16119
16143
|
_this.isFiltered = true;
|
|
16120
16144
|
_this.customFilterQuery = query;
|
|
16121
16145
|
_this.remoteFilterAction = true;
|
|
16146
|
+
_this.isCustomFiltering = true;
|
|
16122
16147
|
_this.dataUpdater(dataSource, query, fields);
|
|
16123
16148
|
},
|
|
16124
16149
|
event: e,
|
|
@@ -19797,6 +19822,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
19797
19822
|
function ListBox(options, element) {
|
|
19798
19823
|
var _this = _super.call(this, options, element) || this;
|
|
19799
19824
|
_this.isValidKey = false;
|
|
19825
|
+
_this.isBackSpace = false;
|
|
19800
19826
|
_this.isDataSourceUpdate = false;
|
|
19801
19827
|
_this.keyDownStatus = false;
|
|
19802
19828
|
return _this;
|
|
@@ -20065,6 +20091,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
20065
20091
|
}
|
|
20066
20092
|
};
|
|
20067
20093
|
ListBox.prototype.onActionComplete = function (ulElement, list, e) {
|
|
20094
|
+
var _this = this;
|
|
20068
20095
|
var searchEle;
|
|
20069
20096
|
var filterElem;
|
|
20070
20097
|
var txtLength;
|
|
@@ -20131,8 +20158,9 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
20131
20158
|
}
|
|
20132
20159
|
filterElem.selectionStart = txtLength;
|
|
20133
20160
|
filterElem.selectionEnd = txtLength;
|
|
20134
|
-
if (filterElem.value !== '') {
|
|
20161
|
+
if (filterElem.value !== '' || (filterElem.value === '' && this.isBackSpace)) {
|
|
20135
20162
|
filterElem.focus();
|
|
20163
|
+
setTimeout(function () { _this.isBackSpace = false; });
|
|
20136
20164
|
}
|
|
20137
20165
|
}
|
|
20138
20166
|
}
|
|
@@ -21737,7 +21765,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
21737
21765
|
};
|
|
21738
21766
|
ListBox.prototype.KeyUp = function (e) {
|
|
21739
21767
|
var _this = this;
|
|
21740
|
-
if (this.allowFiltering &&
|
|
21768
|
+
if (this.allowFiltering && e.ctrlKey && e.keyCode === 65) {
|
|
21741
21769
|
e.preventDefault();
|
|
21742
21770
|
return;
|
|
21743
21771
|
}
|
|
@@ -21746,6 +21774,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
21746
21774
|
if (!isNullOrUndefined(isWordCharacter)) {
|
|
21747
21775
|
this.isValidKey = true;
|
|
21748
21776
|
}
|
|
21777
|
+
this.isBackSpace = e.keyCode === 8;
|
|
21749
21778
|
this.isValidKey = (e.keyCode === 8) || (e.keyCode === 46) || this.isValidKey;
|
|
21750
21779
|
if (this.isValidKey) {
|
|
21751
21780
|
this.isValidKey = false;
|