@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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 19.4.50
3
+ * version : 19.4.52
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-dropdowns@*",
3
- "_id": "@syncfusion/ej2-dropdowns@19.4.48",
3
+ "_id": "@syncfusion/ej2-dropdowns@19.4.50",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-Yz0UF3J4mNNGlnvZkoMxKP295uhWJ4RxTLPV206SJguJLs8vT2mrpyamdhwKQPNBCY8d9YnnIb4KWBBozWHYYw==",
5
+ "_integrity": "sha512-QGOybqNswXLGfBBVUE/0SV+yldUhsGaD7afKpCsXy7IUVChGACHOc4UM0tXjg8pzUt34IEeE/2UqidkskhFoVw==",
6
6
  "_location": "/@syncfusion/ej2-dropdowns",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -33,8 +33,8 @@
33
33
  "/@syncfusion/ej2-spreadsheet",
34
34
  "/@syncfusion/ej2-vue-dropdowns"
35
35
  ],
36
- "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-19.4.48.tgz",
37
- "_shasum": "4de8f8a1da32155d9904a785d115f78fe5be553e",
36
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-19.4.50.tgz",
37
+ "_shasum": "a96bfa5151c3c55ebf48b93efa6ee4610536d2ec",
38
38
  "_spec": "@syncfusion/ej2-dropdowns@*",
39
39
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
40
40
  "author": {
@@ -42,12 +42,12 @@
42
42
  },
43
43
  "bundleDependencies": false,
44
44
  "dependencies": {
45
- "@syncfusion/ej2-base": "~19.4.48",
46
- "@syncfusion/ej2-data": "~19.4.50",
47
- "@syncfusion/ej2-inputs": "~19.4.48",
48
- "@syncfusion/ej2-lists": "~19.4.48",
49
- "@syncfusion/ej2-navigations": "~19.4.50",
50
- "@syncfusion/ej2-popups": "~19.4.50"
45
+ "@syncfusion/ej2-base": "~19.4.52",
46
+ "@syncfusion/ej2-data": "~19.4.52",
47
+ "@syncfusion/ej2-inputs": "~19.4.52",
48
+ "@syncfusion/ej2-lists": "~19.4.52",
49
+ "@syncfusion/ej2-navigations": "~19.4.52",
50
+ "@syncfusion/ej2-popups": "~19.4.52"
51
51
  },
52
52
  "deprecated": false,
53
53
  "description": "Essential JS 2 DropDown Components",
@@ -72,6 +72,6 @@
72
72
  "module": "./index.js",
73
73
  "name": "@syncfusion/ej2-dropdowns",
74
74
  "typings": "index.d.ts",
75
- "version": "19.4.50",
75
+ "version": "19.4.52",
76
76
  "sideEffects": false
77
77
  }
@@ -494,7 +494,7 @@ var DropDownBase = /** @class */ (function (_super) {
494
494
  }
495
495
  _this.bindChildItems(localDataArgs.result, ulElement, fields);
496
496
  setTimeout(function () {
497
- if (_this.getModuleName() === 'multiselect' && _this.itemTemplate != null && (ulElement.childElementCount > 0 && ulElement.children[0].childElementCount > 0)) {
497
+ 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)))) {
498
498
  _this.updateDataList();
499
499
  }
500
500
  });
@@ -581,7 +581,6 @@ var DropDownBase = /** @class */ (function (_super) {
581
581
  if (this.isReact) {
582
582
  this.clearTemplate(['itemTemplate', 'groupTemplate', 'actionFailureTemplate', 'noRecordsTemplate']);
583
583
  }
584
- this.list.innerHTML = '';
585
584
  this.fixedHeaderElement = isNullOrUndefined(this.fixedHeaderElement) ? this.fixedHeaderElement : null;
586
585
  if (this.getModuleName() === 'multiselect' && this.properties.allowCustomValue && this.fields.groupBy) {
587
586
  for (var i = 0; i < ulElement.childElementCount; i++) {
@@ -592,10 +591,13 @@ var DropDownBase = /** @class */ (function (_super) {
592
591
  }
593
592
  }
594
593
  }
595
- this.list.appendChild(ulElement);
596
- this.liCollections = this.list.querySelectorAll('.' + dropDownBaseClasses.li);
597
- this.ulElement = this.list.querySelector('ul');
598
- this.postRender(this.list, list, this.bindEvent);
594
+ if (!isNullOrUndefined(this.list)) {
595
+ this.list.innerHTML = '';
596
+ this.list.appendChild(ulElement);
597
+ this.liCollections = this.list.querySelectorAll('.' + dropDownBaseClasses.li);
598
+ this.ulElement = this.list.querySelector('ul');
599
+ this.postRender(this.list, list, this.bindEvent);
600
+ }
599
601
  };
600
602
  /* eslint-disable @typescript-eslint/no-unused-vars */
601
603
  DropDownBase.prototype.postRender = function (listElement, list, bindEvent) {
@@ -329,7 +329,9 @@ var MultiSelect = /** @class */ (function (_super) {
329
329
  return ariaAttributes;
330
330
  };
331
331
  MultiSelect.prototype.updateListARIA = function () {
332
- attributes(this.ulElement, { 'id': this.element.id + '_options', 'role': 'listbox', 'aria-hidden': 'false' });
332
+ if (!isNullOrUndefined(this.ulElement)) {
333
+ attributes(this.ulElement, { 'id': this.element.id + '_options', 'role': 'listbox', 'aria-hidden': 'false' });
334
+ }
333
335
  var disableStatus = (this.inputElement.disabled) ? true : false;
334
336
  attributes(this.inputElement, this.getAriaAttributes());
335
337
  if (disableStatus) {
@@ -2463,8 +2465,13 @@ var MultiSelect = /** @class */ (function (_super) {
2463
2465
  }
2464
2466
  };
2465
2467
  MultiSelect.prototype.updateDataList = function () {
2466
- if (this.mainList && this.ulElement && (this.mainList.childElementCount < this.ulElement.childElementCount || ((this.ulElement.childElementCount > 0 && this.ulElement.children[0].childElementCount > 0) && (this.mainList.children[0].childElementCount < this.ulElement.children[0].childElementCount)))) {
2467
- this.mainList = this.ulElement.cloneNode ? this.ulElement.cloneNode(true) : this.ulElement;
2468
+ if (this.mainList && this.ulElement) {
2469
+ var isDynamicGroupItemUpdate = this.mainList.childElementCount < this.ulElement.childElementCount;
2470
+ var isReactTemplateUpdate = ((this.ulElement.childElementCount > 0 && this.ulElement.children[0].childElementCount > 0) && (this.mainList.children[0].childElementCount < this.ulElement.children[0].childElementCount));
2471
+ 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));
2472
+ if (isDynamicGroupItemUpdate || isReactTemplateUpdate || isAngularTemplateUpdate) {
2473
+ this.mainList = this.ulElement.cloneNode ? this.ulElement.cloneNode(true) : this.ulElement;
2474
+ }
2468
2475
  }
2469
2476
  };
2470
2477
  MultiSelect.prototype.isValidLI = function (li) {
@@ -2813,11 +2820,13 @@ var MultiSelect = /** @class */ (function (_super) {
2813
2820
  }
2814
2821
  };
2815
2822
  MultiSelect.prototype.wireListEvents = function () {
2816
- EventHandler.add(document, 'mousedown', this.onDocumentClick, this);
2817
- EventHandler.add(this.list, 'mousedown', this.onListMouseDown, this);
2818
- EventHandler.add(this.list, 'mouseup', this.onMouseClick, this);
2819
- EventHandler.add(this.list, 'mouseover', this.onMouseOver, this);
2820
- EventHandler.add(this.list, 'mouseout', this.onMouseLeave, this);
2823
+ if (!isNullOrUndefined(this.list)) {
2824
+ EventHandler.add(document, 'mousedown', this.onDocumentClick, this);
2825
+ EventHandler.add(this.list, 'mousedown', this.onListMouseDown, this);
2826
+ EventHandler.add(this.list, 'mouseup', this.onMouseClick, this);
2827
+ EventHandler.add(this.list, 'mouseover', this.onMouseOver, this);
2828
+ EventHandler.add(this.list, 'mouseout', this.onMouseLeave, this);
2829
+ }
2821
2830
  };
2822
2831
  MultiSelect.prototype.unwireListEvents = function () {
2823
2832
  EventHandler.remove(document, 'mousedown', this.onDocumentClick);