@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.
@@ -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 {
@@ -6463,6 +6473,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6463
6473
  record = this.grid.getCurrentViewRecords()[row.rowIndex];
6464
6474
  }
6465
6475
  }
6476
+ else if (this.rowTemplate) {
6477
+ record = this.grid.getCurrentViewRecords()[row.rowIndex];
6478
+ }
6466
6479
  else {
6467
6480
  record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('data-rowindex'), 10)];
6468
6481
  }
@@ -6715,11 +6728,16 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6715
6728
  this.expandCollapseAll('collapse');
6716
6729
  };
6717
6730
  TreeGrid.prototype.expandCollapseAll = function (action) {
6718
- var rows = this.getRows().filter(function (e) {
6719
- return e.querySelector('.e-treegrid' + (action === 'expand' ? 'collapse' : 'expand'));
6720
- });
6721
- if (!rows.length && this.getRows().length) {
6722
- 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
+ });
6723
6741
  }
6724
6742
  this.isExpandAll = true;
6725
6743
  this.isCollapseAll = true;
@@ -11871,6 +11889,7 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
11871
11889
  };
11872
11890
  Edit$$1.prototype.beforeBatchCancel = function (args) {
11873
11891
  if (this.parent.editSettings.mode === 'Cell') {
11892
+ args['requestType'] = 'cancel';
11874
11893
  this.parent.trigger(actionComplete, args);
11875
11894
  }
11876
11895
  };