@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
|
@@ -637,7 +637,7 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
637
637
|
}
|
|
638
638
|
this.bindChildItems(localDataArgs.result, ulElement, fields);
|
|
639
639
|
setTimeout(() => {
|
|
640
|
-
if (this.getModuleName() === 'multiselect' && this.itemTemplate != null && (ulElement.childElementCount > 0 && ulElement.children[0].childElementCount > 0)) {
|
|
640
|
+
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)))) {
|
|
641
641
|
this.updateDataList();
|
|
642
642
|
}
|
|
643
643
|
});
|
|
@@ -723,7 +723,6 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
723
723
|
if (this.isReact) {
|
|
724
724
|
this.clearTemplate(['itemTemplate', 'groupTemplate', 'actionFailureTemplate', 'noRecordsTemplate']);
|
|
725
725
|
}
|
|
726
|
-
this.list.innerHTML = '';
|
|
727
726
|
this.fixedHeaderElement = isNullOrUndefined(this.fixedHeaderElement) ? this.fixedHeaderElement : null;
|
|
728
727
|
if (this.getModuleName() === 'multiselect' && this.properties.allowCustomValue && this.fields.groupBy) {
|
|
729
728
|
for (let i = 0; i < ulElement.childElementCount; i++) {
|
|
@@ -734,10 +733,13 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
734
733
|
}
|
|
735
734
|
}
|
|
736
735
|
}
|
|
737
|
-
this.list
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
736
|
+
if (!isNullOrUndefined(this.list)) {
|
|
737
|
+
this.list.innerHTML = '';
|
|
738
|
+
this.list.appendChild(ulElement);
|
|
739
|
+
this.liCollections = this.list.querySelectorAll('.' + dropDownBaseClasses.li);
|
|
740
|
+
this.ulElement = this.list.querySelector('ul');
|
|
741
|
+
this.postRender(this.list, list, this.bindEvent);
|
|
742
|
+
}
|
|
741
743
|
}
|
|
742
744
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
743
745
|
postRender(listElement, list, bindEvent) {
|
|
@@ -8948,7 +8950,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
8948
8950
|
return ariaAttributes;
|
|
8949
8951
|
}
|
|
8950
8952
|
updateListARIA() {
|
|
8951
|
-
|
|
8953
|
+
if (!isNullOrUndefined(this.ulElement)) {
|
|
8954
|
+
attributes(this.ulElement, { 'id': this.element.id + '_options', 'role': 'listbox', 'aria-hidden': 'false' });
|
|
8955
|
+
}
|
|
8952
8956
|
const disableStatus = (this.inputElement.disabled) ? true : false;
|
|
8953
8957
|
attributes(this.inputElement, this.getAriaAttributes());
|
|
8954
8958
|
if (disableStatus) {
|
|
@@ -11076,8 +11080,13 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
11076
11080
|
}
|
|
11077
11081
|
}
|
|
11078
11082
|
updateDataList() {
|
|
11079
|
-
if (this.mainList && this.ulElement
|
|
11080
|
-
|
|
11083
|
+
if (this.mainList && this.ulElement) {
|
|
11084
|
+
let isDynamicGroupItemUpdate = this.mainList.childElementCount < this.ulElement.childElementCount;
|
|
11085
|
+
let isReactTemplateUpdate = ((this.ulElement.childElementCount > 0 && this.ulElement.children[0].childElementCount > 0) && (this.mainList.children[0].childElementCount < this.ulElement.children[0].childElementCount));
|
|
11086
|
+
let 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));
|
|
11087
|
+
if (isDynamicGroupItemUpdate || isReactTemplateUpdate || isAngularTemplateUpdate) {
|
|
11088
|
+
this.mainList = this.ulElement.cloneNode ? this.ulElement.cloneNode(true) : this.ulElement;
|
|
11089
|
+
}
|
|
11081
11090
|
}
|
|
11082
11091
|
}
|
|
11083
11092
|
isValidLI(li) {
|
|
@@ -11424,11 +11433,13 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
11424
11433
|
}
|
|
11425
11434
|
}
|
|
11426
11435
|
wireListEvents() {
|
|
11427
|
-
|
|
11428
|
-
|
|
11429
|
-
|
|
11430
|
-
|
|
11431
|
-
|
|
11436
|
+
if (!isNullOrUndefined(this.list)) {
|
|
11437
|
+
EventHandler.add(document, 'mousedown', this.onDocumentClick, this);
|
|
11438
|
+
EventHandler.add(this.list, 'mousedown', this.onListMouseDown, this);
|
|
11439
|
+
EventHandler.add(this.list, 'mouseup', this.onMouseClick, this);
|
|
11440
|
+
EventHandler.add(this.list, 'mouseover', this.onMouseOver, this);
|
|
11441
|
+
EventHandler.add(this.list, 'mouseout', this.onMouseLeave, this);
|
|
11442
|
+
}
|
|
11432
11443
|
}
|
|
11433
11444
|
unwireListEvents() {
|
|
11434
11445
|
EventHandler.remove(document, 'mousedown', this.onDocumentClick);
|