@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.
@@ -1739,11 +1739,21 @@ class Render {
1739
1739
  }
1740
1740
  }
1741
1741
  this.parent['args'] = args;
1742
- if ((isNullOrUndefined(this.parent.rowTemplate) && !(this.parent.isReact))
1743
- || ((this.parent.isReact) &&
1744
- !args.column['template'])) {
1742
+ const columnModel = getValue('columnModel', this.parent);
1743
+ const treeColumn = columnModel[this.parent.treeColumnIndex];
1744
+ if ((isNullOrUndefined(this.parent.rowTemplate) && !(this.parent.isReact))) {
1745
1745
  this.parent.trigger(queryCellInfo, args);
1746
1746
  }
1747
+ else if (((this.parent.isReact) &&
1748
+ treeColumn.field !== args.column.field)) {
1749
+ const renderReactTemplates = 'renderReactTemplates';
1750
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
1751
+ const thisRef = this;
1752
+ // tslint:disable-next-line:typedef
1753
+ thisRef.parent[`${renderReactTemplates}`](function () {
1754
+ thisRef.parent.trigger(queryCellInfo, args);
1755
+ });
1756
+ }
1747
1757
  }
1748
1758
  updateTreeCell(args, cellElement) {
1749
1759
  const columnModel = getValue('columnModel', this.parent);
@@ -6403,11 +6413,16 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
6403
6413
  this.expandCollapseAll('collapse');
6404
6414
  }
6405
6415
  expandCollapseAll(action) {
6406
- const rows = this.getRows().filter((e) => {
6407
- return e.querySelector('.e-treegrid' + (action === 'expand' ? 'collapse' : 'expand'));
6408
- });
6409
- if (!rows.length && this.getRows().length) {
6410
- rows.push(this.getRows()[0]);
6416
+ let rows;
6417
+ if (this.rowTemplate) {
6418
+ rows = [].slice.call(this.grid.getContentTable().querySelectorAll('tr')).filter((e) => {
6419
+ return e.querySelector('.e-treegrid' + (action === 'expand' ? 'collapse' : 'expand'));
6420
+ });
6421
+ }
6422
+ else {
6423
+ rows = this.getRows().filter((e) => {
6424
+ return e.querySelector('.e-treegrid' + (action === 'expand' ? 'collapse' : 'expand'));
6425
+ });
6411
6426
  }
6412
6427
  this.isExpandAll = true;
6413
6428
  this.isCollapseAll = true;