@syncfusion/ej2-treegrid 24.2.8 → 24.2.9

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.
@@ -1896,11 +1896,21 @@ var Render = /** @__PURE__ @class */ (function () {
1896
1896
  }
1897
1897
  }
1898
1898
  this.parent['args'] = args;
1899
- if ((isNullOrUndefined(this.parent.rowTemplate) && !(this.parent.isReact))
1900
- || ((this.parent.isReact) &&
1901
- !args.column['template'])) {
1899
+ var columnModel = getValue('columnModel', this.parent);
1900
+ var treeColumn = columnModel[this.parent.treeColumnIndex];
1901
+ if ((isNullOrUndefined(this.parent.rowTemplate) && !(this.parent.isReact))) {
1902
1902
  this.parent.trigger(queryCellInfo, args);
1903
1903
  }
1904
+ else if (((this.parent.isReact) &&
1905
+ treeColumn.field !== args.column.field)) {
1906
+ var renderReactTemplates = 'renderReactTemplates';
1907
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
1908
+ var thisRef_2 = this;
1909
+ // tslint:disable-next-line:typedef
1910
+ thisRef_2.parent["" + renderReactTemplates](function () {
1911
+ thisRef_2.parent.trigger(queryCellInfo, args);
1912
+ });
1913
+ }
1904
1914
  };
1905
1915
  Render.prototype.updateTreeCell = function (args, cellElement) {
1906
1916
  var columnModel = getValue('columnModel', this.parent);
@@ -1936,10 +1946,10 @@ var Render = /** @__PURE__ @class */ (function () {
1936
1946
  }
1937
1947
  this.parent.notify('renderReactTemplate', this.parent["" + portals]);
1938
1948
  // eslint-disable-next-line @typescript-eslint/no-this-alias
1939
- var thisRef_2 = this;
1949
+ var thisRef_3 = this;
1940
1950
  // tslint:disable-next-line:typedef
1941
- thisRef_2.parent["" + renderReactTemplates](function () {
1942
- thisRef_2.parent.trigger(queryCellInfo, args);
1951
+ thisRef_3.parent["" + renderReactTemplates](function () {
1952
+ thisRef_3.parent.trigger(queryCellInfo, args);
1943
1953
  });
1944
1954
  }
1945
1955
  else {
@@ -6718,11 +6728,16 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6718
6728
  this.expandCollapseAll('collapse');
6719
6729
  };
6720
6730
  TreeGrid.prototype.expandCollapseAll = function (action) {
6721
- var rows = this.getRows().filter(function (e) {
6722
- return e.querySelector('.e-treegrid' + (action === 'expand' ? 'collapse' : 'expand'));
6723
- });
6724
- if (!rows.length && this.getRows().length) {
6725
- rows.push(this.getRows()[0]);
6731
+ var rows;
6732
+ if (this.rowTemplate) {
6733
+ rows = [].slice.call(this.grid.getContentTable().querySelectorAll('tr')).filter(function (e) {
6734
+ return e.querySelector('.e-treegrid' + (action === 'expand' ? 'collapse' : 'expand'));
6735
+ });
6736
+ }
6737
+ else {
6738
+ rows = this.getRows().filter(function (e) {
6739
+ return e.querySelector('.e-treegrid' + (action === 'expand' ? 'collapse' : 'expand'));
6740
+ });
6726
6741
  }
6727
6742
  this.isExpandAll = true;
6728
6743
  this.isCollapseAll = true;