@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.
@@ -635,6 +635,11 @@ let DropDownBase = class DropDownBase extends Component {
635
635
  this.renderGroupTemplate(ulElement);
636
636
  }
637
637
  this.bindChildItems(localDataArgs.result, ulElement, fields);
638
+ setTimeout(() => {
639
+ if (this.getModuleName() === 'multiselect' && (ulElement.childElementCount > 0 && ulElement.children[0].childElementCount > 0)) {
640
+ this.updateDataList();
641
+ }
642
+ });
638
643
  }
639
644
  });
640
645
  }
@@ -2083,7 +2088,7 @@ let DropDownList = class DropDownList extends DropDownBase {
2083
2088
  if (this.isSelectFocusItem(focusEle)) {
2084
2089
  this.setSelection(focusEle, e);
2085
2090
  }
2086
- else {
2091
+ else if (!isNullOrUndefined(this.liCollections)) {
2087
2092
  let index = e.action === 'down' ? this.activeIndex + 1 : this.activeIndex - 1;
2088
2093
  let startIndex = 0;
2089
2094
  if (this.getModuleName() === 'autocomplete') {
@@ -5433,9 +5438,14 @@ let DropDownTree = class DropDownTree extends Component {
5433
5438
  }
5434
5439
  else {
5435
5440
  if (this.showCheckBox) {
5436
- this.treeObj.checkedNodes = this.value.slice();
5437
- this.treeObj.dataBind();
5438
- this.setMultiSelect();
5441
+ let difference = this.value.filter((e) => {
5442
+ return this.treeObj.checkedNodes.indexOf(e) === -1;
5443
+ });
5444
+ if (difference.length > 0 || this.treeSettings.autoCheck) {
5445
+ this.treeObj.checkedNodes = this.value.slice();
5446
+ this.treeObj.dataBind();
5447
+ this.setMultiSelect();
5448
+ }
5439
5449
  }
5440
5450
  else {
5441
5451
  this.treeObj.selectedNodes = this.value.slice();
@@ -6471,6 +6481,9 @@ let DropDownTree = class DropDownTree extends Component {
6471
6481
  this.ensurePlaceHolder();
6472
6482
  }
6473
6483
  resetValue(isDynamicChange) {
6484
+ if (this.value == [] && this.text == null) {
6485
+ return;
6486
+ }
6474
6487
  Input.setValue(null, this.inputEle, this.floatLabelType);
6475
6488
  if (!isDynamicChange) {
6476
6489
  this.oldValue = this.value;
@@ -6482,7 +6495,8 @@ let DropDownTree = class DropDownTree extends Component {
6482
6495
  setValue('selectedNodes', [], this.treeObj);
6483
6496
  this.hiddenElement.innerHTML = '';
6484
6497
  if (this.showCheckBox) {
6485
- this.treeObj.uncheckAll();
6498
+ this.treeObj.checkedNodes = [];
6499
+ this.treeObj.dataBind();
6486
6500
  this.setMultiSelect();
6487
6501
  this.clearCheckAll();
6488
6502
  }
@@ -6859,8 +6873,8 @@ let DropDownTree = class DropDownTree extends Component {
6859
6873
  this.updateTemplate();
6860
6874
  }
6861
6875
  this.treeObj.sortOrder = newProp.sortOrder;
6862
- this.updateValue(this.value);
6863
6876
  this.treeObj.dataBind();
6877
+ this.updateValue(this.value);
6864
6878
  break;
6865
6879
  case 'showDropDownIcon':
6866
6880
  this.updateDropDownIconState(newProp.showDropDownIcon);
@@ -9601,6 +9615,13 @@ let MultiSelect = class MultiSelect extends DropDownBase {
9601
9615
  const focusedItem = this.list.querySelector('.' + dropDownBaseClasses.focus);
9602
9616
  if (!isNullOrUndefined(focusedItem)) {
9603
9617
  this.inputElement.setAttribute('aria-activedescendant', focusedItem.id);
9618
+ if (this.allowFiltering) {
9619
+ var filterInput = this.popupWrapper.querySelector('.' + FILTERINPUT);
9620
+ filterInput && filterInput.setAttribute('aria-activedescendant', focusedItem.id);
9621
+ }
9622
+ else if (this.mode == "CheckBox") {
9623
+ this.overAllWrapper.setAttribute('aria-activedescendant', focusedItem.id);
9624
+ }
9604
9625
  }
9605
9626
  }
9606
9627
  homeNavigation(isHome) {
@@ -9716,7 +9737,6 @@ let MultiSelect = class MultiSelect extends DropDownBase {
9716
9737
  this.keyAction = true;
9717
9738
  if (document.activeElement.classList.contains(FILTERINPUT)
9718
9739
  || (this.mode === 'CheckBox' && !this.allowFiltering && document.activeElement !== this.list)) {
9719
- this.list.focus();
9720
9740
  EventHandler.add(this.list, 'keydown', this.onKeyDown, this);
9721
9741
  }
9722
9742
  this.updateAriaAttribute();
@@ -10735,7 +10755,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
10735
10755
  EventHandler.add(this.inputElement, 'input', this.onInput, this);
10736
10756
  }
10737
10757
  EventHandler.add(this.inputElement, 'blur', this.onBlurHandler, this);
10738
- EventHandler.add(this.componentWrapper, 'mousemove', this.mouseIn, this);
10758
+ EventHandler.add(this.componentWrapper, 'mouseover', this.mouseIn, this);
10739
10759
  const formElement = closest(this.inputElement, 'form');
10740
10760
  if (formElement) {
10741
10761
  EventHandler.add(formElement, 'reset', this.resetValueHandler, this);
@@ -11001,7 +11021,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
11001
11021
  }
11002
11022
  }
11003
11023
  updateDataList() {
11004
- if (this.mainList && this.ulElement && this.mainList.childElementCount < this.ulElement.childElementCount) {
11024
+ 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)))) {
11005
11025
  this.mainList = this.ulElement.cloneNode ? this.ulElement.cloneNode(true) : this.ulElement;
11006
11026
  }
11007
11027
  }
@@ -11627,7 +11647,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
11627
11647
  EventHandler.remove(formElement, 'reset', this.resetValueHandler);
11628
11648
  }
11629
11649
  EventHandler.remove(this.inputElement, 'blur', this.onBlurHandler);
11630
- EventHandler.remove(this.componentWrapper, 'mousemove', this.mouseIn);
11650
+ EventHandler.remove(this.componentWrapper, 'mouseover', this.mouseIn);
11631
11651
  EventHandler.remove(this.componentWrapper, 'mouseout', this.mouseOut);
11632
11652
  EventHandler.remove(this.overAllClear, 'mousedown', this.clearAll);
11633
11653
  EventHandler.remove(this.inputElement, 'paste', this.pasteHandler);