@syncfusion/ej2-treegrid 25.1.37 → 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.
@@ -1987,17 +1987,20 @@ var Render = /** @__PURE__ @class */ (function () {
1987
1987
  var cells = 'cells';
1988
1988
  var rowIdx = 'index';
1989
1989
  var rowsObj = _this.parent.grid.getRowsObject();
1990
+ var rows = _this.parent.getDataRows();
1990
1991
  var indent = _this.parent.grid.getIndentCount();
1991
1992
  var cellIndex = _this.parent.grid.getNormalizedColumnIndex(columnUid);
1992
- for (var j = 0; j < rowsObj.length; j++) {
1993
- if (rowsObj[parseInt(j.toString(), 10)].isDataRow && !isNullOrUndefined(rowsObj[parseInt(j.toString(), 10)].index)) {
1994
- var cell = rowsObj[parseInt(j.toString(), 10)]["" + cells][parseInt(cellIndex.toString(), 10)];
1995
- var cellRenderer = new CellRenderer(_this.parent.grid, _this.parent.grid.serviceLocator);
1996
- var td = _this.parent.getCellFromIndex(rowsObj[parseInt(j.toString(), 10)].index, cellIndex - indent);
1997
- cellRenderer.refreshTD(td, cell, rowsObj[parseInt(j.toString(), 10)].data, { index: rowsObj[parseInt(j.toString(), 10)]["" + rowIdx] });
1998
- var treecell = _this.parent.getRows()[parseInt(j.toString(), 10)]
1999
- .cells[parseInt(cellIndex.toString(), 10)];
2000
- _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
+ }
2001
2004
  }
2002
2005
  }
2003
2006
  });