@syncfusion/ej2-dropdowns 20.1.56 → 20.1.59
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/CHANGELOG.md +27 -3
- 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 +33 -13
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +33 -13
- 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 +9 -9
- package/src/auto-complete/auto-complete.d.ts +1 -1
- package/src/auto-complete/auto-complete.js +2 -2
- package/src/combo-box/combo-box.js +1 -1
- package/src/drop-down-base/drop-down-base.js +1 -1
- package/src/drop-down-list/drop-down-list.js +10 -2
- package/src/drop-down-tree/drop-down-tree.js +9 -7
- package/src/list-box/list-box.js +7 -0
- package/src/multi-select/multi-select.js +3 -0
|
@@ -614,10 +614,10 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
614
614
|
this.isDataFetched = true;
|
|
615
615
|
}
|
|
616
616
|
ulElement = this.renderItems(listItems, fields);
|
|
617
|
-
this.onActionComplete(ulElement, listItems, e);
|
|
618
617
|
if (this.groupTemplate) {
|
|
619
618
|
this.renderGroupTemplate(ulElement);
|
|
620
619
|
}
|
|
620
|
+
this.onActionComplete(ulElement, listItems, e);
|
|
621
621
|
this.isRequested = false;
|
|
622
622
|
this.bindChildItems(listItems, ulElement, fields, e);
|
|
623
623
|
}
|
|
@@ -2464,13 +2464,21 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
2464
2464
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2465
2465
|
if (this.isReact) {
|
|
2466
2466
|
this.clearTemplate(['valueTemplate']);
|
|
2467
|
+
if (this.valueTempElement) {
|
|
2468
|
+
detach(this.valueTempElement);
|
|
2469
|
+
this.inputElement.style.display = 'block';
|
|
2470
|
+
this.valueTempElement = null;
|
|
2471
|
+
}
|
|
2467
2472
|
}
|
|
2468
2473
|
if (!this.valueTempElement) {
|
|
2469
2474
|
this.valueTempElement = this.createElement('span', { className: dropDownListClasses.value });
|
|
2470
2475
|
this.inputElement.parentElement.insertBefore(this.valueTempElement, this.inputElement);
|
|
2471
2476
|
this.inputElement.style.display = 'none';
|
|
2472
2477
|
}
|
|
2473
|
-
|
|
2478
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2479
|
+
if (!this.isReact) {
|
|
2480
|
+
this.valueTempElement.innerHTML = '';
|
|
2481
|
+
}
|
|
2474
2482
|
const valuecheck = this.dropdownCompiler(this.valueTemplate);
|
|
2475
2483
|
if (valuecheck) {
|
|
2476
2484
|
compiledString = compile(document.querySelector(this.valueTemplate).innerHTML.trim());
|
|
@@ -2956,7 +2964,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
2956
2964
|
}
|
|
2957
2965
|
updateActionCompleteDataValues(ulElement, list) {
|
|
2958
2966
|
this.actionCompleteData = { ulElement: ulElement.cloneNode(true), list: list, isUpdated: true };
|
|
2959
|
-
if (
|
|
2967
|
+
if (this.actionData.list !== this.actionCompleteData.list && this.actionCompleteData.ulElement && this.actionCompleteData.list) {
|
|
2960
2968
|
this.actionData = this.actionCompleteData;
|
|
2961
2969
|
}
|
|
2962
2970
|
}
|
|
@@ -4597,13 +4605,14 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
4597
4605
|
matchedChildren.push(filteredChild);
|
|
4598
4606
|
}
|
|
4599
4607
|
}
|
|
4608
|
+
let filteredItems = Object.assign({}, node);
|
|
4600
4609
|
if (matchedChildren.length !== 0) {
|
|
4601
|
-
|
|
4602
|
-
return
|
|
4610
|
+
filteredItems[this.fields.child] = matchedChildren;
|
|
4611
|
+
return filteredItems;
|
|
4603
4612
|
}
|
|
4604
4613
|
else {
|
|
4605
|
-
|
|
4606
|
-
return (this.isMatchedNode(value,
|
|
4614
|
+
filteredItems[this.fields.child] = null;
|
|
4615
|
+
return (this.isMatchedNode(value, filteredItems)) ? filteredItems : null;
|
|
4607
4616
|
}
|
|
4608
4617
|
}
|
|
4609
4618
|
}
|
|
@@ -5937,11 +5946,12 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
5937
5946
|
}
|
|
5938
5947
|
return 2;
|
|
5939
5948
|
}
|
|
5940
|
-
|
|
5941
|
-
|
|
5949
|
+
this.fields.dataSource = isNullOrUndefined(this.fields.dataSource) ? [] : this.fields.dataSource;
|
|
5950
|
+
for (let i = 0, len = this.fields.dataSource.length; i < len; i++) {
|
|
5951
|
+
if ((typeof field.child === 'string') && !isNullOrUndefined(getValue(field.child, this.fields.dataSource[i]))) {
|
|
5942
5952
|
return 2;
|
|
5943
5953
|
}
|
|
5944
|
-
if (!isNullOrUndefined(getValue(field.parentValue,
|
|
5954
|
+
if (!isNullOrUndefined(getValue(field.parentValue, this.fields.dataSource[i])) || !isNullOrUndefined(getValue(field.hasChildren, this.fields.dataSource[i]))) {
|
|
5945
5955
|
return 1;
|
|
5946
5956
|
}
|
|
5947
5957
|
}
|
|
@@ -7743,7 +7753,7 @@ let ComboBox = class ComboBox extends DropDownList {
|
|
|
7743
7753
|
else if (this.isTyped && !this.isSelected && isNullOrUndefined(li)) {
|
|
7744
7754
|
this.customValue(e);
|
|
7745
7755
|
}
|
|
7746
|
-
this.hidePopup();
|
|
7756
|
+
this.hidePopup(e);
|
|
7747
7757
|
}
|
|
7748
7758
|
setHoverList(li) {
|
|
7749
7759
|
this.removeSelection();
|
|
@@ -8385,8 +8395,8 @@ let AutoComplete = class AutoComplete extends ComboBox {
|
|
|
8385
8395
|
*
|
|
8386
8396
|
* @returns {void}
|
|
8387
8397
|
*/
|
|
8388
|
-
hidePopup() {
|
|
8389
|
-
super.hidePopup();
|
|
8398
|
+
hidePopup(e) {
|
|
8399
|
+
super.hidePopup(e);
|
|
8390
8400
|
this.activeIndex = -1;
|
|
8391
8401
|
}
|
|
8392
8402
|
/**
|
|
@@ -9273,6 +9283,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
9273
9283
|
}
|
|
9274
9284
|
getQuery(query) {
|
|
9275
9285
|
const filterQuery = query ? query.clone() : this.query ? this.query.clone() : new Query();
|
|
9286
|
+
if (this.isFiltered) {
|
|
9287
|
+
return filterQuery;
|
|
9288
|
+
}
|
|
9276
9289
|
if (this.filterAction) {
|
|
9277
9290
|
if (this.targetElement() !== null) {
|
|
9278
9291
|
const dataType = this.typeOfData(this.dataSource).typeof;
|
|
@@ -15282,6 +15295,13 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
15282
15295
|
this.list.parentElement.insertBefore(this.element, this.list);
|
|
15283
15296
|
}
|
|
15284
15297
|
super.destroy();
|
|
15298
|
+
this.enableRtlElements = [];
|
|
15299
|
+
this.liCollections = null;
|
|
15300
|
+
this.list = null;
|
|
15301
|
+
this.ulElement = null;
|
|
15302
|
+
this.mainList = null;
|
|
15303
|
+
this.spinner = null;
|
|
15304
|
+
this.rippleFun = null;
|
|
15285
15305
|
if (this.itemTemplate) {
|
|
15286
15306
|
this.clearTemplate();
|
|
15287
15307
|
}
|