@syncfusion/ej2-treegrid 24.2.7 → 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);
@@ -6155,6 +6165,9 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
6155
6165
  record = this.grid.getCurrentViewRecords()[row.rowIndex];
6156
6166
  }
6157
6167
  }
6168
+ else if (this.rowTemplate) {
6169
+ record = this.grid.getCurrentViewRecords()[row.rowIndex];
6170
+ }
6158
6171
  else {
6159
6172
  record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('data-rowindex'), 10)];
6160
6173
  }
@@ -6400,11 +6413,16 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
6400
6413
  this.expandCollapseAll('collapse');
6401
6414
  }
6402
6415
  expandCollapseAll(action) {
6403
- const rows = this.getRows().filter((e) => {
6404
- return e.querySelector('.e-treegrid' + (action === 'expand' ? 'collapse' : 'expand'));
6405
- });
6406
- if (!rows.length && this.getRows().length) {
6407
- 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
+ });
6408
6426
  }
6409
6427
  this.isExpandAll = true;
6410
6428
  this.isCollapseAll = true;
@@ -11469,6 +11487,7 @@ class Edit$1 {
11469
11487
  }
11470
11488
  beforeBatchCancel(args) {
11471
11489
  if (this.parent.editSettings.mode === 'Cell') {
11490
+ args['requestType'] = 'cancel';
11472
11491
  this.parent.trigger(actionComplete, args);
11473
11492
  }
11474
11493
  }