@syncfusion/ej2-treegrid 25.1.35 → 25.1.38

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.
@@ -1898,7 +1898,9 @@ var Render = /** @__PURE__ @class */ (function () {
1898
1898
  this.parent['args'] = args;
1899
1899
  var columnModel = getValue('columnModel', this.parent);
1900
1900
  var treeColumn = columnModel[this.parent.treeColumnIndex];
1901
- if ((isNullOrUndefined(this.parent.rowTemplate) && !(this.parent.isReact))) {
1901
+ if ((isNullOrUndefined(this.parent.rowTemplate) && !(this.parent.isReact))
1902
+ || ((this.parent.isReact) &&
1903
+ !args.column['template'])) {
1902
1904
  this.parent.trigger(queryCellInfo, args);
1903
1905
  }
1904
1906
  else if (((this.parent.isReact) &&
@@ -1985,17 +1987,20 @@ var Render = /** @__PURE__ @class */ (function () {
1985
1987
  var cells = 'cells';
1986
1988
  var rowIdx = 'index';
1987
1989
  var rowsObj = _this.parent.grid.getRowsObject();
1990
+ var rows = _this.parent.getDataRows();
1988
1991
  var indent = _this.parent.grid.getIndentCount();
1989
1992
  var cellIndex = _this.parent.grid.getNormalizedColumnIndex(columnUid);
1990
- for (var j = 0; j < rowsObj.length; j++) {
1991
- if (rowsObj[parseInt(j.toString(), 10)].isDataRow && !isNullOrUndefined(rowsObj[parseInt(j.toString(), 10)].index)) {
1992
- var cell = rowsObj[parseInt(j.toString(), 10)]["" + cells][parseInt(cellIndex.toString(), 10)];
1993
- var cellRenderer = new CellRenderer(_this.parent.grid, _this.parent.grid.serviceLocator);
1994
- var td = _this.parent.getCellFromIndex(rowsObj[parseInt(j.toString(), 10)].index, cellIndex - indent);
1995
- cellRenderer.refreshTD(td, cell, rowsObj[parseInt(j.toString(), 10)].data, { index: rowsObj[parseInt(j.toString(), 10)]["" + rowIdx] });
1996
- var treecell = _this.parent.getRows()[parseInt(j.toString(), 10)]
1997
- .cells[parseInt(cellIndex.toString(), 10)];
1998
- _this.cellRender({ data: rowsObj[parseInt(j.toString(), 10)].data, cell: treecell, column: cell.column });
1993
+ if (rows.length !== 0) {
1994
+ for (var j = 0; j < rowsObj.length; j++) {
1995
+ if (rowsObj[parseInt(j.toString(), 10)].isDataRow && !isNullOrUndefined(rowsObj[parseInt(j.toString(), 10)].index)) {
1996
+ var cell = rowsObj[parseInt(j.toString(), 10)]["" + cells][parseInt(cellIndex.toString(), 10)];
1997
+ var cellRenderer = new CellRenderer(_this.parent.grid, _this.parent.grid.serviceLocator);
1998
+ var td = _this.parent.getCellFromIndex(rowsObj[parseInt(j.toString(), 10)].index, cellIndex - indent);
1999
+ cellRenderer.refreshTD(td, cell, rowsObj[parseInt(j.toString(), 10)].data, { index: rowsObj[parseInt(j.toString(), 10)]["" + rowIdx] });
2000
+ var treecell = _this.parent.getRows()[parseInt(j.toString(), 10)]
2001
+ .cells[parseInt(cellIndex.toString(), 10)];
2002
+ _this.cellRender({ data: rowsObj[parseInt(j.toString(), 10)].data, cell: treecell, column: cell.column });
2003
+ }
1999
2004
  }
2000
2005
  }
2001
2006
  });
@@ -4404,7 +4409,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4404
4409
  var gridContent = this.element.getElementsByClassName('e-gridcontent')[0].childNodes[0];
4405
4410
  gridContent.setAttribute('tabindex', '0');
4406
4411
  var contentTable = this.element.getElementsByClassName('e-content')[0].querySelector('.e-table');
4407
- contentTable.setAttribute('role', 'treegrid');
4412
+ if (!isNullOrUndefined(contentTable)) {
4413
+ contentTable.setAttribute('role', 'treegrid');
4414
+ }
4408
4415
  if (this.isIndentEnabled) {
4409
4416
  this.refreshToolbarItems();
4410
4417
  }
@@ -6128,6 +6135,17 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6128
6135
  var persist2 = 'mergeColumns';
6129
6136
  this.grid["" + persist2].apply(this, [storedColumn, columns]);
6130
6137
  };
6138
+ TreeGrid.prototype.setFrozenCount = function () {
6139
+ var persist3 = 'setFrozenCount';
6140
+ this.grid["" + persist3].apply(this);
6141
+ };
6142
+ TreeGrid.prototype.splitFrozenCount = function (columns) {
6143
+ var persist4 = 'splitFrozenCount';
6144
+ this.grid["" + persist4].apply(this, [columns]);
6145
+ };
6146
+ TreeGrid.prototype.isFrozenGrid = function () {
6147
+ return this.grid.isFrozenGrid();
6148
+ };
6131
6149
  TreeGrid.prototype.updateTreeGridModel = function () {
6132
6150
  this.setProperties({ filterSettings: getObject('properties', this.grid.filterSettings) }, true);
6133
6151
  this.setProperties({ pageSettings: getObject('properties', this.grid.pageSettings) }, true);