@syncfusion/ej2-dropdowns 23.2.6 → 23.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/CHANGELOG.md +24 -0
- 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 +27 -8
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +28 -8
- 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 +6 -6
- package/src/auto-complete/auto-complete.js +4 -0
- package/src/drop-down-list/drop-down-list.js +21 -7
- package/src/drop-down-tree/drop-down-tree.js +2 -0
- package/src/multi-select/multi-select.js +1 -1
|
@@ -2957,6 +2957,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
2957
2957
|
this.isDocumentClick = true;
|
|
2958
2958
|
const isActive = this.isRequested;
|
|
2959
2959
|
this.hidePopup(e);
|
|
2960
|
+
this.isInteracted = false;
|
|
2960
2961
|
if (!isActive) {
|
|
2961
2962
|
this.onFocusOut();
|
|
2962
2963
|
this.inputWrapper.container.classList.remove(dropDownListClasses.inputFocus);
|
|
@@ -3151,10 +3152,21 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3151
3152
|
this.setSelectOptions(li, e);
|
|
3152
3153
|
if (this.enableVirtualization) {
|
|
3153
3154
|
const fields = (this.fields.value) ? this.fields.value : '';
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3155
|
+
if (this.dataSource instanceof DataManager) {
|
|
3156
|
+
this.dataSource.executeQuery(new Query().where(new Predicate(fields, 'equal', this.value)))
|
|
3157
|
+
.then((e) => {
|
|
3158
|
+
if (e.result.length > 0) {
|
|
3159
|
+
this.itemData = e.result[0];
|
|
3160
|
+
this.setProperties({ 'text': e.result[0].text, 'value': e.result[0].value }, true);
|
|
3161
|
+
}
|
|
3162
|
+
});
|
|
3163
|
+
}
|
|
3164
|
+
else {
|
|
3165
|
+
const getItem = new DataManager(this.dataSource).executeLocal(new Query().where(new Predicate(fields, 'equal', this.value)));
|
|
3166
|
+
if (getItem && getItem.length > 0) {
|
|
3167
|
+
this.itemData = getItem[0];
|
|
3168
|
+
this.setProperties({ 'text': getItem[0].text, 'value': getItem[0].value }, true);
|
|
3169
|
+
}
|
|
3158
3170
|
}
|
|
3159
3171
|
}
|
|
3160
3172
|
}
|
|
@@ -4886,7 +4898,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
4886
4898
|
EventHandler.add(this.list, 'scroll', this.setFloatingHeader, this);
|
|
4887
4899
|
}
|
|
4888
4900
|
if (!(!isNullOrUndefined(props) && (isNullOrUndefined(props.dataSource)
|
|
4889
|
-
|| (!(props.dataSource instanceof DataManager) && props.dataSource.length === 0))) || !(props.dataSource ===
|
|
4901
|
+
|| (!(props.dataSource instanceof DataManager) && props.dataSource.length === 0))) || !(Array.isArray(props.dataSource) && props.dataSource.length === 0)) {
|
|
4890
4902
|
this.typedString = '';
|
|
4891
4903
|
this.resetList(this.dataSource);
|
|
4892
4904
|
}
|
|
@@ -5228,7 +5240,9 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5228
5240
|
});
|
|
5229
5241
|
}
|
|
5230
5242
|
}
|
|
5231
|
-
this.
|
|
5243
|
+
if (this.beforePopupOpen) {
|
|
5244
|
+
this.invokeRenderPopup(e);
|
|
5245
|
+
}
|
|
5232
5246
|
if (this.enableVirtualization && !this.allowFiltering && this.selectedValueInfo != null && this.selectedValueInfo.startIndex > 0 && this.value != null) {
|
|
5233
5247
|
this.notify("dataProcessAsync", {
|
|
5234
5248
|
module: "VirtualScroll",
|
|
@@ -5288,7 +5302,6 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5288
5302
|
this.isSelectCustom = false;
|
|
5289
5303
|
this.clearAll(e);
|
|
5290
5304
|
}
|
|
5291
|
-
this.isInteracted = false;
|
|
5292
5305
|
}
|
|
5293
5306
|
/* eslint-disable valid-jsdoc, jsdoc/require-param */
|
|
5294
5307
|
/**
|
|
@@ -6979,6 +6992,8 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
6979
6992
|
if (this.isFilteredData) {
|
|
6980
6993
|
this.filterObj.value = '';
|
|
6981
6994
|
this.treeObj.fields = this.getTreeFields(this.fields);
|
|
6995
|
+
if (this.isReact)
|
|
6996
|
+
this.refresh();
|
|
6982
6997
|
this.isFilterRestore = true;
|
|
6983
6998
|
this.isFilteredData = false;
|
|
6984
6999
|
this.hideCheckAll(false);
|
|
@@ -9798,6 +9813,10 @@ let AutoComplete = class AutoComplete extends ComboBox {
|
|
|
9798
9813
|
}, 0);
|
|
9799
9814
|
}
|
|
9800
9815
|
else {
|
|
9816
|
+
const isHtmlElement = /<[^>]*>/g.test(e.item.innerText);
|
|
9817
|
+
if (isHtmlElement) {
|
|
9818
|
+
e.item.innerText = e.item.innerText.replace(/[\u00A0-\u9999<>&]/g, (match) => `&#${match.charCodeAt(0)};`);
|
|
9819
|
+
}
|
|
9801
9820
|
highlightSearch(e.item, this.queryString, this.ignoreCase, this.filterType);
|
|
9802
9821
|
}
|
|
9803
9822
|
}
|
|
@@ -12753,7 +12772,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
12753
12772
|
updateDataList() {
|
|
12754
12773
|
if (this.mainList && this.ulElement && !(this.isFiltered || this.filterAction || this.targetElement().trim())) {
|
|
12755
12774
|
let isDynamicGroupItemUpdate = this.mainList.childElementCount < this.ulElement.childElementCount;
|
|
12756
|
-
let isReactTemplateUpdate = ((this.ulElement.childElementCount > 0 && this.ulElement.children[0].childElementCount > 0) && (this.mainList.children[0]
|
|
12775
|
+
let isReactTemplateUpdate = ((this.ulElement.childElementCount > 0 && this.ulElement.children[0].childElementCount > 0) && (this.mainList.children[0] && (this.mainList.children[0].childElementCount < this.ulElement.children[0].childElementCount)));
|
|
12757
12776
|
let isAngularTemplateUpdate = this.itemTemplate && this.ulElement.childElementCount > 0 && !(this.ulElement.childElementCount < this.mainList.childElementCount) && (this.ulElement.children[0].childElementCount > 0 || (this.fields.groupBy && this.ulElement.children[1] && this.ulElement.children[1].childElementCount > 0));
|
|
12758
12777
|
if (isDynamicGroupItemUpdate || isReactTemplateUpdate || isAngularTemplateUpdate) {
|
|
12759
12778
|
//EJ2-57748 - for this task, we prevent the ul element cloning ( this.mainList = this.ulElement.cloneNode ? <HTMLElement>this.ulElement.cloneNode(true) : this.ulElement;)
|