@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
|
@@ -3063,6 +3063,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3063
3063
|
this.isDocumentClick = true;
|
|
3064
3064
|
var isActive = this.isRequested;
|
|
3065
3065
|
this.hidePopup(e);
|
|
3066
|
+
this.isInteracted = false;
|
|
3066
3067
|
if (!isActive) {
|
|
3067
3068
|
this.onFocusOut();
|
|
3068
3069
|
this.inputWrapper.container.classList.remove(dropDownListClasses.inputFocus);
|
|
@@ -3250,6 +3251,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3250
3251
|
}
|
|
3251
3252
|
};
|
|
3252
3253
|
DropDownList.prototype.setSelection = function (li, e) {
|
|
3254
|
+
var _this = this;
|
|
3253
3255
|
if (this.isValidLI(li) && (!li.classList.contains(dropDownBaseClasses.selected) || (this.isPopupOpen && this.isSelected
|
|
3254
3256
|
&& li.classList.contains(dropDownBaseClasses.selected)))) {
|
|
3255
3257
|
this.updateSelectedItem(li, e, false, true);
|
|
@@ -3258,10 +3260,21 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3258
3260
|
this.setSelectOptions(li, e);
|
|
3259
3261
|
if (this.enableVirtualization) {
|
|
3260
3262
|
var fields = (this.fields.value) ? this.fields.value : '';
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3263
|
+
if (this.dataSource instanceof DataManager) {
|
|
3264
|
+
this.dataSource.executeQuery(new Query().where(new Predicate(fields, 'equal', this.value)))
|
|
3265
|
+
.then(function (e) {
|
|
3266
|
+
if (e.result.length > 0) {
|
|
3267
|
+
_this.itemData = e.result[0];
|
|
3268
|
+
_this.setProperties({ 'text': e.result[0].text, 'value': e.result[0].value }, true);
|
|
3269
|
+
}
|
|
3270
|
+
});
|
|
3271
|
+
}
|
|
3272
|
+
else {
|
|
3273
|
+
var getItem = new DataManager(this.dataSource).executeLocal(new Query().where(new Predicate(fields, 'equal', this.value)));
|
|
3274
|
+
if (getItem && getItem.length > 0) {
|
|
3275
|
+
this.itemData = getItem[0];
|
|
3276
|
+
this.setProperties({ 'text': getItem[0].text, 'value': getItem[0].value }, true);
|
|
3277
|
+
}
|
|
3265
3278
|
}
|
|
3266
3279
|
}
|
|
3267
3280
|
}
|
|
@@ -5008,7 +5021,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5008
5021
|
EventHandler.add(this.list, 'scroll', this.setFloatingHeader, this);
|
|
5009
5022
|
}
|
|
5010
5023
|
if (!(!isNullOrUndefined(props) && (isNullOrUndefined(props.dataSource)
|
|
5011
|
-
|| (!(props.dataSource instanceof DataManager) && props.dataSource.length === 0))) || !(props.dataSource ===
|
|
5024
|
+
|| (!(props.dataSource instanceof DataManager) && props.dataSource.length === 0))) || !(Array.isArray(props.dataSource) && props.dataSource.length === 0)) {
|
|
5012
5025
|
this.typedString = '';
|
|
5013
5026
|
this.resetList(this.dataSource);
|
|
5014
5027
|
}
|
|
@@ -5357,7 +5370,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5357
5370
|
});
|
|
5358
5371
|
}
|
|
5359
5372
|
}
|
|
5360
|
-
this.
|
|
5373
|
+
if (this.beforePopupOpen) {
|
|
5374
|
+
this.invokeRenderPopup(e);
|
|
5375
|
+
}
|
|
5361
5376
|
if (this.enableVirtualization && !this.allowFiltering && this.selectedValueInfo != null && this.selectedValueInfo.startIndex > 0 && this.value != null) {
|
|
5362
5377
|
this.notify("dataProcessAsync", {
|
|
5363
5378
|
module: "VirtualScroll",
|
|
@@ -5417,7 +5432,6 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5417
5432
|
this.isSelectCustom = false;
|
|
5418
5433
|
this.clearAll(e);
|
|
5419
5434
|
}
|
|
5420
|
-
this.isInteracted = false;
|
|
5421
5435
|
};
|
|
5422
5436
|
/* eslint-disable valid-jsdoc, jsdoc/require-param */
|
|
5423
5437
|
/**
|
|
@@ -7143,6 +7157,8 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
7143
7157
|
if (this.isFilteredData) {
|
|
7144
7158
|
this.filterObj.value = '';
|
|
7145
7159
|
this.treeObj.fields = this.getTreeFields(this.fields);
|
|
7160
|
+
if (this.isReact)
|
|
7161
|
+
this.refresh();
|
|
7146
7162
|
this.isFilterRestore = true;
|
|
7147
7163
|
this.isFilteredData = false;
|
|
7148
7164
|
this.hideCheckAll(false);
|
|
@@ -10001,6 +10017,10 @@ var AutoComplete = /** @__PURE__ @class */ (function (_super) {
|
|
|
10001
10017
|
}, 0);
|
|
10002
10018
|
}
|
|
10003
10019
|
else {
|
|
10020
|
+
var isHtmlElement = /<[^>]*>/g.test(e.item.innerText);
|
|
10021
|
+
if (isHtmlElement) {
|
|
10022
|
+
e.item.innerText = e.item.innerText.replace(/[\u00A0-\u9999<>&]/g, function (match) { return "&#" + match.charCodeAt(0) + ";"; });
|
|
10023
|
+
}
|
|
10004
10024
|
highlightSearch(e.item, _this_1.queryString, _this_1.ignoreCase, _this_1.filterType);
|
|
10005
10025
|
}
|
|
10006
10026
|
}
|
|
@@ -12982,7 +13002,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12982
13002
|
MultiSelect.prototype.updateDataList = function () {
|
|
12983
13003
|
if (this.mainList && this.ulElement && !(this.isFiltered || this.filterAction || this.targetElement().trim())) {
|
|
12984
13004
|
var isDynamicGroupItemUpdate = this.mainList.childElementCount < this.ulElement.childElementCount;
|
|
12985
|
-
var isReactTemplateUpdate = ((this.ulElement.childElementCount > 0 && this.ulElement.children[0].childElementCount > 0) && (this.mainList.children[0]
|
|
13005
|
+
var 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)));
|
|
12986
13006
|
var 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));
|
|
12987
13007
|
if (isDynamicGroupItemUpdate || isReactTemplateUpdate || isAngularTemplateUpdate) {
|
|
12988
13008
|
//EJ2-57748 - for this task, we prevent the ul element cloning ( this.mainList = this.ulElement.cloneNode ? <HTMLElement>this.ulElement.cloneNode(true) : this.ulElement;)
|