@syncfusion/ej2-dropdowns 19.4.50 → 19.4.52
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 +2 -0
- package/README.md +1 -1
- 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 +25 -14
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +25 -14
- 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 +11 -11
- package/src/drop-down-base/drop-down-base.js +8 -6
- package/src/multi-select/multi-select.js +17 -8
|
@@ -661,7 +661,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
661
661
|
}
|
|
662
662
|
_this.bindChildItems(localDataArgs.result, ulElement, fields);
|
|
663
663
|
setTimeout(function () {
|
|
664
|
-
if (_this.getModuleName() === 'multiselect' && _this.itemTemplate != null && (ulElement.childElementCount > 0 && ulElement.children[0].childElementCount > 0)) {
|
|
664
|
+
if (_this.getModuleName() === 'multiselect' && _this.itemTemplate != null && (ulElement.childElementCount > 0 && (ulElement.children[0].childElementCount > 0 || (_this.fields.groupBy && ulElement.children[1] && ulElement.children[1].childElementCount > 0)))) {
|
|
665
665
|
_this.updateDataList();
|
|
666
666
|
}
|
|
667
667
|
});
|
|
@@ -748,7 +748,6 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
748
748
|
if (this.isReact) {
|
|
749
749
|
this.clearTemplate(['itemTemplate', 'groupTemplate', 'actionFailureTemplate', 'noRecordsTemplate']);
|
|
750
750
|
}
|
|
751
|
-
this.list.innerHTML = '';
|
|
752
751
|
this.fixedHeaderElement = isNullOrUndefined(this.fixedHeaderElement) ? this.fixedHeaderElement : null;
|
|
753
752
|
if (this.getModuleName() === 'multiselect' && this.properties.allowCustomValue && this.fields.groupBy) {
|
|
754
753
|
for (var i = 0; i < ulElement.childElementCount; i++) {
|
|
@@ -759,10 +758,13 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
759
758
|
}
|
|
760
759
|
}
|
|
761
760
|
}
|
|
762
|
-
this.list
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
761
|
+
if (!isNullOrUndefined(this.list)) {
|
|
762
|
+
this.list.innerHTML = '';
|
|
763
|
+
this.list.appendChild(ulElement);
|
|
764
|
+
this.liCollections = this.list.querySelectorAll('.' + dropDownBaseClasses.li);
|
|
765
|
+
this.ulElement = this.list.querySelector('ul');
|
|
766
|
+
this.postRender(this.list, list, this.bindEvent);
|
|
767
|
+
}
|
|
766
768
|
};
|
|
767
769
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
768
770
|
DropDownBase.prototype.postRender = function (listElement, list, bindEvent) {
|
|
@@ -9103,7 +9105,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
9103
9105
|
return ariaAttributes;
|
|
9104
9106
|
};
|
|
9105
9107
|
MultiSelect.prototype.updateListARIA = function () {
|
|
9106
|
-
|
|
9108
|
+
if (!isNullOrUndefined(this.ulElement)) {
|
|
9109
|
+
attributes(this.ulElement, { 'id': this.element.id + '_options', 'role': 'listbox', 'aria-hidden': 'false' });
|
|
9110
|
+
}
|
|
9107
9111
|
var disableStatus = (this.inputElement.disabled) ? true : false;
|
|
9108
9112
|
attributes(this.inputElement, this.getAriaAttributes());
|
|
9109
9113
|
if (disableStatus) {
|
|
@@ -11237,8 +11241,13 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
11237
11241
|
}
|
|
11238
11242
|
};
|
|
11239
11243
|
MultiSelect.prototype.updateDataList = function () {
|
|
11240
|
-
if (this.mainList && this.ulElement
|
|
11241
|
-
|
|
11244
|
+
if (this.mainList && this.ulElement) {
|
|
11245
|
+
var isDynamicGroupItemUpdate = this.mainList.childElementCount < this.ulElement.childElementCount;
|
|
11246
|
+
var isReactTemplateUpdate = ((this.ulElement.childElementCount > 0 && this.ulElement.children[0].childElementCount > 0) && (this.mainList.children[0].childElementCount < this.ulElement.children[0].childElementCount));
|
|
11247
|
+
var isAngularTemplateUpdate = this.itemTemplate && this.ulElement.childElementCount > 0 && (this.ulElement.children[0].childElementCount > 0 || (this.fields.groupBy && this.ulElement.children[1] && this.ulElement.children[1].childElementCount > 0));
|
|
11248
|
+
if (isDynamicGroupItemUpdate || isReactTemplateUpdate || isAngularTemplateUpdate) {
|
|
11249
|
+
this.mainList = this.ulElement.cloneNode ? this.ulElement.cloneNode(true) : this.ulElement;
|
|
11250
|
+
}
|
|
11242
11251
|
}
|
|
11243
11252
|
};
|
|
11244
11253
|
MultiSelect.prototype.isValidLI = function (li) {
|
|
@@ -11587,11 +11596,13 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
11587
11596
|
}
|
|
11588
11597
|
};
|
|
11589
11598
|
MultiSelect.prototype.wireListEvents = function () {
|
|
11590
|
-
|
|
11591
|
-
|
|
11592
|
-
|
|
11593
|
-
|
|
11594
|
-
|
|
11599
|
+
if (!isNullOrUndefined(this.list)) {
|
|
11600
|
+
EventHandler.add(document, 'mousedown', this.onDocumentClick, this);
|
|
11601
|
+
EventHandler.add(this.list, 'mousedown', this.onListMouseDown, this);
|
|
11602
|
+
EventHandler.add(this.list, 'mouseup', this.onMouseClick, this);
|
|
11603
|
+
EventHandler.add(this.list, 'mouseover', this.onMouseOver, this);
|
|
11604
|
+
EventHandler.add(this.list, 'mouseout', this.onMouseLeave, this);
|
|
11605
|
+
}
|
|
11595
11606
|
};
|
|
11596
11607
|
MultiSelect.prototype.unwireListEvents = function () {
|
|
11597
11608
|
EventHandler.remove(document, 'mousedown', this.onDocumentClick);
|