@syncfusion/ej2-dropdowns 19.3.53 → 19.4.40

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.
@@ -659,6 +659,11 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
659
659
  _this.renderGroupTemplate(ulElement);
660
660
  }
661
661
  _this.bindChildItems(localDataArgs.result, ulElement, fields);
662
+ setTimeout(function () {
663
+ if (_this.getModuleName() === 'multiselect' && (ulElement.childElementCount > 0 && ulElement.children[0].childElementCount > 0)) {
664
+ _this.updateDataList();
665
+ }
666
+ });
662
667
  }
663
668
  });
664
669
  }
@@ -2129,7 +2134,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2129
2134
  if (this.isSelectFocusItem(focusEle)) {
2130
2135
  this.setSelection(focusEle, e);
2131
2136
  }
2132
- else {
2137
+ else if (!isNullOrUndefined(this.liCollections)) {
2133
2138
  var index = e.action === 'down' ? this.activeIndex + 1 : this.activeIndex - 1;
2134
2139
  var startIndex = 0;
2135
2140
  if (this.getModuleName() === 'autocomplete') {
@@ -5516,6 +5521,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
5516
5521
  }
5517
5522
  };
5518
5523
  DropDownTree.prototype.setValidValue = function () {
5524
+ var _this = this;
5519
5525
  if (!this.showCheckBox && !this.allowMultiSelection) {
5520
5526
  Input.setValue(this.text, this.inputEle, this.floatLabelType);
5521
5527
  var id = this.value[0].toString();
@@ -5525,9 +5531,14 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
5525
5531
  }
5526
5532
  else {
5527
5533
  if (this.showCheckBox) {
5528
- this.treeObj.checkedNodes = this.value.slice();
5529
- this.treeObj.dataBind();
5530
- this.setMultiSelect();
5534
+ var difference = this.value.filter(function (e) {
5535
+ return _this.treeObj.checkedNodes.indexOf(e) === -1;
5536
+ });
5537
+ if (difference.length > 0 || this.treeSettings.autoCheck) {
5538
+ this.treeObj.checkedNodes = this.value.slice();
5539
+ this.treeObj.dataBind();
5540
+ this.setMultiSelect();
5541
+ }
5531
5542
  }
5532
5543
  else {
5533
5544
  this.treeObj.selectedNodes = this.value.slice();
@@ -6565,6 +6576,9 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
6565
6576
  this.ensurePlaceHolder();
6566
6577
  };
6567
6578
  DropDownTree.prototype.resetValue = function (isDynamicChange) {
6579
+ if (this.value == [] && this.text == null) {
6580
+ return;
6581
+ }
6568
6582
  Input.setValue(null, this.inputEle, this.floatLabelType);
6569
6583
  if (!isDynamicChange) {
6570
6584
  this.oldValue = this.value;
@@ -6576,7 +6590,8 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
6576
6590
  setValue('selectedNodes', [], this.treeObj);
6577
6591
  this.hiddenElement.innerHTML = '';
6578
6592
  if (this.showCheckBox) {
6579
- this.treeObj.uncheckAll();
6593
+ this.treeObj.checkedNodes = [];
6594
+ this.treeObj.dataBind();
6580
6595
  this.setMultiSelect();
6581
6596
  this.clearCheckAll();
6582
6597
  }
@@ -6954,8 +6969,8 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
6954
6969
  this.updateTemplate();
6955
6970
  }
6956
6971
  this.treeObj.sortOrder = newProp.sortOrder;
6957
- this.updateValue(this.value);
6958
6972
  this.treeObj.dataBind();
6973
+ this.updateValue(this.value);
6959
6974
  break;
6960
6975
  case 'showDropDownIcon':
6961
6976
  this.updateDropDownIconState(newProp.showDropDownIcon);
@@ -9750,6 +9765,13 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
9750
9765
  var focusedItem = this.list.querySelector('.' + dropDownBaseClasses.focus);
9751
9766
  if (!isNullOrUndefined(focusedItem)) {
9752
9767
  this.inputElement.setAttribute('aria-activedescendant', focusedItem.id);
9768
+ if (this.allowFiltering) {
9769
+ var filterInput = this.popupWrapper.querySelector('.' + FILTERINPUT);
9770
+ filterInput && filterInput.setAttribute('aria-activedescendant', focusedItem.id);
9771
+ }
9772
+ else if (this.mode == "CheckBox") {
9773
+ this.overAllWrapper.setAttribute('aria-activedescendant', focusedItem.id);
9774
+ }
9753
9775
  }
9754
9776
  };
9755
9777
  MultiSelect.prototype.homeNavigation = function (isHome) {
@@ -9865,7 +9887,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
9865
9887
  this.keyAction = true;
9866
9888
  if (document.activeElement.classList.contains(FILTERINPUT)
9867
9889
  || (this.mode === 'CheckBox' && !this.allowFiltering && document.activeElement !== this.list)) {
9868
- this.list.focus();
9869
9890
  EventHandler.add(this.list, 'keydown', this.onKeyDown, this);
9870
9891
  }
9871
9892
  this.updateAriaAttribute();
@@ -10888,7 +10909,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
10888
10909
  EventHandler.add(this.inputElement, 'input', this.onInput, this);
10889
10910
  }
10890
10911
  EventHandler.add(this.inputElement, 'blur', this.onBlurHandler, this);
10891
- EventHandler.add(this.componentWrapper, 'mousemove', this.mouseIn, this);
10912
+ EventHandler.add(this.componentWrapper, 'mouseover', this.mouseIn, this);
10892
10913
  var formElement = closest(this.inputElement, 'form');
10893
10914
  if (formElement) {
10894
10915
  EventHandler.add(formElement, 'reset', this.resetValueHandler, this);
@@ -11156,7 +11177,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
11156
11177
  }
11157
11178
  };
11158
11179
  MultiSelect.prototype.updateDataList = function () {
11159
- if (this.mainList && this.ulElement && this.mainList.childElementCount < this.ulElement.childElementCount) {
11180
+ 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)))) {
11160
11181
  this.mainList = this.ulElement.cloneNode ? this.ulElement.cloneNode(true) : this.ulElement;
11161
11182
  }
11162
11183
  };
@@ -11784,7 +11805,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
11784
11805
  EventHandler.remove(formElement, 'reset', this.resetValueHandler);
11785
11806
  }
11786
11807
  EventHandler.remove(this.inputElement, 'blur', this.onBlurHandler);
11787
- EventHandler.remove(this.componentWrapper, 'mousemove', this.mouseIn);
11808
+ EventHandler.remove(this.componentWrapper, 'mouseover', this.mouseIn);
11788
11809
  EventHandler.remove(this.componentWrapper, 'mouseout', this.mouseOut);
11789
11810
  EventHandler.remove(this.overAllClear, 'mousedown', this.clearAll);
11790
11811
  EventHandler.remove(this.inputElement, 'paste', this.pasteHandler);