@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.
@@ -6825,8 +6825,12 @@ var Accordion = /** @__PURE__ @class */ (function (_super) {
6825
6825
  this.updateItem(item, index);
6826
6826
  }
6827
6827
  if (property === 'cssClass' && !isNullOrUndefined(item)) {
6828
- item.classList.remove(oldVal);
6829
- item.classList.add(newVal);
6828
+ if (oldVal) {
6829
+ removeClass([item], oldVal.split(' '));
6830
+ }
6831
+ if (newVal) {
6832
+ addClass([item], newVal.split(' '));
6833
+ }
6830
6834
  }
6831
6835
  if (property === 'visible' && !isNullOrUndefined(item)) {
6832
6836
  if (Object(newProp.items[index])[property] === false) {
@@ -9970,6 +9974,8 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
9970
9974
  _this.changeDataSource = false;
9971
9975
  _this.hasTemplate = false;
9972
9976
  _this.isFirstRender = false;
9977
+ // Specifies whether the node is dropped or not
9978
+ _this.isNodeDropped = false;
9973
9979
  _this.mouseDownStatus = false;
9974
9980
  return _this;
9975
9981
  }
@@ -11182,11 +11188,12 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11182
11188
  this.updateCheckedProp();
11183
11189
  this.isAnimate = true;
11184
11190
  this.isInitalExpand = false;
11185
- if (!this.isLoaded || this.isFieldChange) {
11191
+ if ((!this.isLoaded || this.isFieldChange) && !this.isNodeDropped) {
11186
11192
  var eventArgs = { data: this.treeData };
11187
11193
  this.trigger('dataBound', eventArgs);
11188
11194
  }
11189
11195
  this.isLoaded = true;
11196
+ this.isNodeDropped = false;
11190
11197
  };
11191
11198
  TreeView.prototype.doSelectionAction = function () {
11192
11199
  var sNodes = selectAll('.' + SELECTED$1, this.element);
@@ -12410,8 +12417,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
12410
12417
  var expanded = (currLi.getAttribute('aria-expanded') === 'true') ? true : false;
12411
12418
  var hasChildren = currLi.getAttribute('aria-expanded') !== null ? true : (select('.' + EXPANDABLE, currLi) || select('.' + COLLAPSIBLE, currLi)) != null ? true : false;
12412
12419
  var checked = null;
12413
- if (this.showCheckBox) {
12414
- checked = select('.' + CHECKBOXWRAP, currLi).getAttribute('aria-checked');
12420
+ var checkboxElement = select('.' + CHECKBOXWRAP, currLi);
12421
+ if (this.showCheckBox && checkboxElement) {
12422
+ checked = checkboxElement.getAttribute('aria-checked');
12415
12423
  }
12416
12424
  return {
12417
12425
  id: id, text: text, parentID: pid, selected: selected, expanded: expanded,
@@ -12922,6 +12930,8 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
12922
12930
  this.trigger('nodeDropped', this.getDragEvent(e.event, dragObj, dropTarget, e.target, e.dragData.draggedElement, null, level, drop));
12923
12931
  if (dragObj.element.id !== this.element.id) {
12924
12932
  dragObj.triggerEvent();
12933
+ this.isNodeDropped = true;
12934
+ this.fields.dataSource = this.treeData;
12925
12935
  }
12926
12936
  this.triggerEvent();
12927
12937
  };