@syncfusion/ej2-navigations 28.1.41 → 28.2.4

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.
@@ -10649,7 +10649,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
10649
10649
  };
10650
10650
  TreeView.prototype.initialize = function () {
10651
10651
  this.element.setAttribute('role', 'tree');
10652
- this.element.setAttribute('aria-activedescendant', this.element.id + '_active');
10652
+ if (!isNullOrUndefined(this.fields.dataSource) && Array.isArray(this.fields.dataSource) && this.fields.dataSource.length !== 0) {
10653
+ this.element.setAttribute('aria-activedescendant', this.element.id + '_active');
10654
+ }
10653
10655
  this.setCssClass(null, this.cssClass);
10654
10656
  this.setEnableRtl();
10655
10657
  this.setFullRow(this.fullRowSelect);
@@ -11822,11 +11824,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11822
11824
  if (!isNullOrUndefined(firstUl)) {
11823
11825
  firstUl.setAttribute('role', treeAriaAttr.treeRole);
11824
11826
  this.setMultiSelect(this.allowMultiSelection);
11825
- var firstNode = select('.' + LISTITEM, this.element);
11826
- if (firstNode) {
11827
- firstNode.setAttribute('tabindex', '0');
11828
- this.updateIdAttr(null, firstNode);
11829
- }
11827
+ this.setNodeFocusable();
11830
11828
  if (this.allowTextWrap) {
11831
11829
  this.updateWrap();
11832
11830
  }
@@ -15521,6 +15519,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
15521
15519
  }
15522
15520
  this.groupedData = this.getGroupedData(this.treeData, this.fields.parentID);
15523
15521
  }
15522
+ this.setNodeFocusable();
15524
15523
  this.updateCheckedStateFromDS();
15525
15524
  if (this.showCheckBox && dropLi) {
15526
15525
  this.ensureParentCheckState(dropLi);
@@ -15918,6 +15917,13 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
15918
15917
  this.doCheckBoxAction(nodes, false);
15919
15918
  }
15920
15919
  };
15920
+ TreeView.prototype.setNodeFocusable = function () {
15921
+ var firstNode = select('.' + LISTITEM, this.element);
15922
+ if (firstNode) {
15923
+ firstNode.setAttribute('tabindex', '0');
15924
+ this.updateIdAttr(null, firstNode);
15925
+ }
15926
+ };
15921
15927
  var TreeView_1;
15922
15928
  __decorate$8([
15923
15929
  Property(false)