@syncfusion/ej2-navigations 20.3.47 → 20.3.48

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.
@@ -6628,8 +6628,12 @@ let Accordion = class Accordion extends Component {
6628
6628
  this.updateItem(item, index);
6629
6629
  }
6630
6630
  if (property === 'cssClass' && !isNullOrUndefined(item)) {
6631
- item.classList.remove(oldVal);
6632
- item.classList.add(newVal);
6631
+ if (oldVal) {
6632
+ removeClass([item], oldVal.split(' '));
6633
+ }
6634
+ if (newVal) {
6635
+ addClass([item], newVal.split(' '));
6636
+ }
6633
6637
  }
6634
6638
  if (property === 'visible' && !isNullOrUndefined(item)) {
6635
6639
  if (Object(newProp.items[index])[property] === false) {
@@ -9654,6 +9658,8 @@ let TreeView = TreeView_1 = class TreeView extends Component {
9654
9658
  this.changeDataSource = false;
9655
9659
  this.hasTemplate = false;
9656
9660
  this.isFirstRender = false;
9661
+ // Specifies whether the node is dropped or not
9662
+ this.isNodeDropped = false;
9657
9663
  this.mouseDownStatus = false;
9658
9664
  }
9659
9665
  /**
@@ -10859,11 +10865,12 @@ let TreeView = TreeView_1 = class TreeView extends Component {
10859
10865
  this.updateCheckedProp();
10860
10866
  this.isAnimate = true;
10861
10867
  this.isInitalExpand = false;
10862
- if (!this.isLoaded || this.isFieldChange) {
10868
+ if ((!this.isLoaded || this.isFieldChange) && !this.isNodeDropped) {
10863
10869
  let eventArgs = { data: this.treeData };
10864
10870
  this.trigger('dataBound', eventArgs);
10865
10871
  }
10866
10872
  this.isLoaded = true;
10873
+ this.isNodeDropped = false;
10867
10874
  }
10868
10875
  doSelectionAction() {
10869
10876
  let sNodes = selectAll('.' + SELECTED$1, this.element);
@@ -12076,8 +12083,9 @@ let TreeView = TreeView_1 = class TreeView extends Component {
12076
12083
  let expanded = (currLi.getAttribute('aria-expanded') === 'true') ? true : false;
12077
12084
  let hasChildren = currLi.getAttribute('aria-expanded') !== null ? true : (select('.' + EXPANDABLE, currLi) || select('.' + COLLAPSIBLE, currLi)) != null ? true : false;
12078
12085
  let checked = null;
12079
- if (this.showCheckBox) {
12080
- checked = select('.' + CHECKBOXWRAP, currLi).getAttribute('aria-checked');
12086
+ const checkboxElement = select('.' + CHECKBOXWRAP, currLi);
12087
+ if (this.showCheckBox && checkboxElement) {
12088
+ checked = checkboxElement.getAttribute('aria-checked');
12081
12089
  }
12082
12090
  return {
12083
12091
  id: id, text: text, parentID: pid, selected: selected, expanded: expanded,
@@ -12585,6 +12593,8 @@ let TreeView = TreeView_1 = class TreeView extends Component {
12585
12593
  this.trigger('nodeDropped', this.getDragEvent(e.event, dragObj, dropTarget, e.target, e.dragData.draggedElement, null, level, drop));
12586
12594
  if (dragObj.element.id !== this.element.id) {
12587
12595
  dragObj.triggerEvent();
12596
+ this.isNodeDropped = true;
12597
+ this.fields.dataSource = this.treeData;
12588
12598
  }
12589
12599
  this.triggerEvent();
12590
12600
  }