@syncfusion/ej2-dropdowns 29.2.4 → 29.2.7
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 +62 -42
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +69 -47
- 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 +8 -8
- package/src/combo-box/combo-box-model.d.ts +1 -1
- package/src/combo-box/combo-box.js +22 -14
- package/src/drop-down-base/drop-down-base.js +17 -0
- package/src/drop-down-list/drop-down-list.js +14 -16
- package/src/drop-down-tree/drop-down-tree.js +3 -11
- package/src/multi-select/multi-select.js +13 -6
|
@@ -1816,6 +1816,13 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1816
1816
|
}
|
|
1817
1817
|
}
|
|
1818
1818
|
}
|
|
1819
|
+
if (this.getModuleName() === 'multiselect' && this.isAngular && this.ngEle) {
|
|
1820
|
+
const popupHolder = this.list;
|
|
1821
|
+
if (popupHolder) {
|
|
1822
|
+
const prevHeight = popupHolder.offsetHeight + 'px';
|
|
1823
|
+
popupHolder.style.height = prevHeight;
|
|
1824
|
+
}
|
|
1825
|
+
}
|
|
1819
1826
|
if (!isNullOrUndefined(this.list)) {
|
|
1820
1827
|
if (!this.isVirtualizationEnabled) {
|
|
1821
1828
|
this.list.innerHTML = '';
|
|
@@ -1825,6 +1832,15 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1825
1832
|
this.postRender(this.list, list, this.bindEvent);
|
|
1826
1833
|
}
|
|
1827
1834
|
}
|
|
1835
|
+
if (this.getModuleName() === 'multiselect' && this.isAngular && this.ngEle) {
|
|
1836
|
+
const popupHolder = this.list;
|
|
1837
|
+
if (popupHolder) {
|
|
1838
|
+
setTimeout(() => {
|
|
1839
|
+
popupHolder.style.height = '';
|
|
1840
|
+
this.refreshPopup();
|
|
1841
|
+
}, 0);
|
|
1842
|
+
}
|
|
1843
|
+
}
|
|
1828
1844
|
}
|
|
1829
1845
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
1830
1846
|
postRender(listElement, list, bindEvent) {
|
|
@@ -4288,7 +4304,8 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
4288
4304
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
4289
4305
|
const proxy = this;
|
|
4290
4306
|
// eslint-disable-next-line max-len
|
|
4291
|
-
const duration = (this.
|
|
4307
|
+
const duration = ((this.dataSource instanceof DataManager) && this.groupTemplate) ? 700 :
|
|
4308
|
+
(this.element.tagName === this.getNgDirective() && this.itemTemplate) ? 500 : 100;
|
|
4292
4309
|
if (!this.isSecondClick) {
|
|
4293
4310
|
setTimeout(() => {
|
|
4294
4311
|
proxy.cloneElements();
|
|
@@ -5141,6 +5158,9 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5141
5158
|
}
|
|
5142
5159
|
if (this.getInitialData) {
|
|
5143
5160
|
this.updateActionCompleteDataValues(ulElement, list);
|
|
5161
|
+
if (this.enableVirtualization) {
|
|
5162
|
+
this.updateSelectElementData(this.allowFiltering);
|
|
5163
|
+
}
|
|
5144
5164
|
this.getInitialData = false;
|
|
5145
5165
|
this.isReactTemplateUpdate = true;
|
|
5146
5166
|
this.searchLists(this.filterArgs);
|
|
@@ -5191,16 +5211,6 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5191
5211
|
if (!this.enableVirtualization) {
|
|
5192
5212
|
this.addItem(e.result, list.length);
|
|
5193
5213
|
}
|
|
5194
|
-
else {
|
|
5195
|
-
this.itemData = e.result[0];
|
|
5196
|
-
const dataItem = this.getItemData();
|
|
5197
|
-
const value = this.allowObjectBinding ?
|
|
5198
|
-
this.getDataByValue(dataItem.value) : dataItem.value;
|
|
5199
|
-
if ((this.value === dataItem.value && this.text !== dataItem.text) ||
|
|
5200
|
-
(this.value !== dataItem.value && this.text === dataItem.text)) {
|
|
5201
|
-
this.setProperties({ 'text': dataItem.text ? dataItem.text.toString() : dataItem.text, 'value': value });
|
|
5202
|
-
}
|
|
5203
|
-
}
|
|
5204
5214
|
this.updateValues();
|
|
5205
5215
|
}
|
|
5206
5216
|
else {
|
|
@@ -6140,6 +6150,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
6140
6150
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6141
6151
|
dataSourceCount = this.dataSource && this.dataSource.length ? this.dataSource.length : 0;
|
|
6142
6152
|
}
|
|
6153
|
+
this.customFilterQuery = null;
|
|
6143
6154
|
if (this.enableVirtualization && this.isFiltering() && isFilterValue && this.totalItemCount !== dataSourceCount) {
|
|
6144
6155
|
this.updateInitialData();
|
|
6145
6156
|
this.checkAndResetCache();
|
|
@@ -6876,6 +6887,9 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
6876
6887
|
if (!this.enabled) {
|
|
6877
6888
|
return;
|
|
6878
6889
|
}
|
|
6890
|
+
if (this.getModuleName() === 'dropdownlist' && this.beforePopupOpen && !this.isPopupOpen) {
|
|
6891
|
+
this.beforePopupOpen = false;
|
|
6892
|
+
}
|
|
6879
6893
|
this.firstItem = this.dataSource && this.dataSource.length > 0 ? this.dataSource[0] : null;
|
|
6880
6894
|
if (this.isReact && this.getModuleName() === 'combobox' && this.itemTemplate && this.isCustomFilter && this.isAddNewItemTemplate) {
|
|
6881
6895
|
this.renderList();
|
|
@@ -8910,7 +8924,8 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
8910
8924
|
loadOnDemand: this.treeSettings.loadOnDemand,
|
|
8911
8925
|
nodeSelecting: this.onBeforeSelect.bind(this),
|
|
8912
8926
|
nodeTemplate: this.itemTemplate,
|
|
8913
|
-
checkDisabledChildren: this.treeSettings.checkDisabledChildren
|
|
8927
|
+
checkDisabledChildren: this.treeSettings.checkDisabledChildren,
|
|
8928
|
+
checkOnClick: true
|
|
8914
8929
|
});
|
|
8915
8930
|
this.treeObj.root = this.root ? this.root : this;
|
|
8916
8931
|
this.treeObj.appendTo(this.tree);
|
|
@@ -8988,7 +9003,7 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
8988
9003
|
this.popupObj.refreshPosition();
|
|
8989
9004
|
if (!(this.showSelectAll || this.allowFiltering) && (!this.popupDiv.classList.contains(NODATA)
|
|
8990
9005
|
&& this.treeItems.length > 0)) {
|
|
8991
|
-
let focusedElement = this.value != null && this.text != null ? this.treeObj.element.querySelector('[data-uid="' + this.value[
|
|
9006
|
+
let focusedElement = this.value != null && this.text != null ? this.treeObj.element.querySelector('[data-uid="' + this.value[this.value.length - 1] + '"]') : null;
|
|
8992
9007
|
if (focusedElement) {
|
|
8993
9008
|
this.treeObj.element.querySelector('li').setAttribute('tabindex', '-1');
|
|
8994
9009
|
focusedElement.setAttribute('tabindex', '0');
|
|
@@ -9434,15 +9449,6 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
9434
9449
|
}
|
|
9435
9450
|
const target = args.event.target;
|
|
9436
9451
|
if ((target.classList.contains('e-fullrow') || target.classList.contains('e-list-text')) && this.showCheckBox) {
|
|
9437
|
-
this.isClicked = true;
|
|
9438
|
-
const getNodeDetails = this.treeObj.getNode(args.node);
|
|
9439
|
-
if (getNodeDetails.isChecked === 'true') {
|
|
9440
|
-
this.treeObj.uncheckAll([args.node]);
|
|
9441
|
-
}
|
|
9442
|
-
else {
|
|
9443
|
-
this.treeObj.checkAll([args.node]);
|
|
9444
|
-
}
|
|
9445
|
-
this.isClicked = false;
|
|
9446
9452
|
this.setMultiSelect();
|
|
9447
9453
|
this.ensurePlaceHolder();
|
|
9448
9454
|
}
|
|
@@ -11029,19 +11035,22 @@ let ComboBox = class ComboBox extends DropDownList {
|
|
|
11029
11035
|
const fields = (this.fields.value) ? this.fields.value : '';
|
|
11030
11036
|
const currentValue = this.allowObjectBinding && !isNullOrUndefined(this.value) ? getValue((this.fields.value) ? this.fields.value : '', this.value) : this.value;
|
|
11031
11037
|
if (this.dataSource instanceof DataManager) {
|
|
11032
|
-
|
|
11033
|
-
|
|
11034
|
-
|
|
11035
|
-
|
|
11036
|
-
|
|
11037
|
-
|
|
11038
|
-
|
|
11039
|
-
|
|
11040
|
-
|
|
11041
|
-
|
|
11042
|
-
|
|
11038
|
+
this.dataSource.executeQuery(new Query().where(new Predicate(fields, 'equal', currentValue)))
|
|
11039
|
+
.then((e) => {
|
|
11040
|
+
if (e.result.length > 0) {
|
|
11041
|
+
this.itemData = e.result[0];
|
|
11042
|
+
const dataItem = this.getItemData();
|
|
11043
|
+
const value = this.allowObjectBinding ?
|
|
11044
|
+
this.getDataByValue(dataItem.value) : dataItem.value;
|
|
11045
|
+
if ((this.value === dataItem.value && this.text !== dataItem.text) ||
|
|
11046
|
+
(this.value !== dataItem.value && this.text === dataItem.text)) {
|
|
11047
|
+
this.setProperties({ 'text': dataItem.text ? dataItem.text.toString() : dataItem.text, 'value': value });
|
|
11048
|
+
}
|
|
11043
11049
|
}
|
|
11044
|
-
|
|
11050
|
+
else {
|
|
11051
|
+
this.valueMuteChange(null);
|
|
11052
|
+
}
|
|
11053
|
+
});
|
|
11045
11054
|
}
|
|
11046
11055
|
else {
|
|
11047
11056
|
const getItem = new DataManager(this.dataSource).executeLocal(new Query().where(new Predicate(fields, 'equal', currentValue)));
|
|
@@ -11069,7 +11078,8 @@ let ComboBox = class ComboBox extends DropDownList {
|
|
|
11069
11078
|
(this.allowCustom && this.enableVirtualization && !doesItemExist)) {
|
|
11070
11079
|
this.valueMuteChange(this.value);
|
|
11071
11080
|
}
|
|
11072
|
-
else if (!this.enableVirtualization || (this.enableVirtualization && !
|
|
11081
|
+
else if (!this.enableVirtualization || (this.enableVirtualization && !(this.dataSource instanceof DataManager)
|
|
11082
|
+
&& !doesItemExist)) {
|
|
11073
11083
|
this.valueMuteChange(null);
|
|
11074
11084
|
}
|
|
11075
11085
|
}
|
|
@@ -11232,7 +11242,10 @@ let ComboBox = class ComboBox extends DropDownList {
|
|
|
11232
11242
|
}
|
|
11233
11243
|
}
|
|
11234
11244
|
const activeElement = activeItem.item;
|
|
11235
|
-
|
|
11245
|
+
const dataItem = this.getItemData();
|
|
11246
|
+
if ((!isNullOrUndefined(activeElement) && !this.enableVirtualization) || (this.enableVirtualization &&
|
|
11247
|
+
this.isTyped && isNullOrUndefined(dataItem) && isNullOrUndefined(dataItem.value) &&
|
|
11248
|
+
dataItem.value.toString() === activeElement.getAttribute('data-value').toString())) {
|
|
11236
11249
|
const count = this.getIndexByValue(activeElement.getAttribute('data-value')) - 1;
|
|
11237
11250
|
const height = parseInt(getComputedStyle(this.liCollections[0], null).getPropertyValue('height'), 10);
|
|
11238
11251
|
if (!isNaN(height) && this.getModuleName() !== 'autocomplete') {
|
|
@@ -13818,13 +13831,20 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
13818
13831
|
this.checkAndScrollParent();
|
|
13819
13832
|
}
|
|
13820
13833
|
checkAndScrollParent() {
|
|
13821
|
-
|
|
13822
|
-
|
|
13823
|
-
const
|
|
13824
|
-
const
|
|
13825
|
-
if (!isNaN(
|
|
13826
|
-
|
|
13834
|
+
let scrollElement = this.overAllWrapper ? this.overAllWrapper.parentElement : null;
|
|
13835
|
+
while (scrollElement) {
|
|
13836
|
+
const scrollElementStyle = getComputedStyle(scrollElement);
|
|
13837
|
+
const scrollElmentHeight = parseFloat(scrollElementStyle.maxHeight) || parseFloat(scrollElementStyle.height);
|
|
13838
|
+
if (!isNaN(scrollElmentHeight) && this.isPopupOpen()) {
|
|
13839
|
+
const overflowY = scrollElementStyle.overflowY;
|
|
13840
|
+
const wrapperBottom = this.overAllWrapper.getBoundingClientRect().bottom;
|
|
13841
|
+
const scrollElementBottom = scrollElement.getBoundingClientRect().bottom;
|
|
13842
|
+
if ((overflowY === 'auto' || overflowY === 'scroll') && wrapperBottom > scrollElementBottom) {
|
|
13843
|
+
scrollElement.scrollTop += (wrapperBottom - scrollElementBottom) + 10;
|
|
13844
|
+
return;
|
|
13845
|
+
}
|
|
13827
13846
|
}
|
|
13847
|
+
scrollElement = scrollElement.parentElement;
|
|
13828
13848
|
}
|
|
13829
13849
|
}
|
|
13830
13850
|
enable(state) {
|