@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.
@@ -1741,7 +1741,9 @@ class Render {
1741
1741
  this.parent['args'] = args;
1742
1742
  const columnModel = getValue('columnModel', this.parent);
1743
1743
  const treeColumn = columnModel[this.parent.treeColumnIndex];
1744
- if ((isNullOrUndefined(this.parent.rowTemplate) && !(this.parent.isReact))) {
1744
+ if ((isNullOrUndefined(this.parent.rowTemplate) && !(this.parent.isReact))
1745
+ || ((this.parent.isReact) &&
1746
+ !args.column['template'])) {
1745
1747
  this.parent.trigger(queryCellInfo, args);
1746
1748
  }
1747
1749
  else if (((this.parent.isReact) &&
@@ -1827,17 +1829,20 @@ class Render {
1827
1829
  const cells = 'cells';
1828
1830
  const rowIdx = 'index';
1829
1831
  const rowsObj = this.parent.grid.getRowsObject();
1832
+ const rows = this.parent.getDataRows();
1830
1833
  const indent = this.parent.grid.getIndentCount();
1831
1834
  const cellIndex = this.parent.grid.getNormalizedColumnIndex(columnUid);
1832
- for (let j = 0; j < rowsObj.length; j++) {
1833
- if (rowsObj[parseInt(j.toString(), 10)].isDataRow && !isNullOrUndefined(rowsObj[parseInt(j.toString(), 10)].index)) {
1834
- const cell = rowsObj[parseInt(j.toString(), 10)][`${cells}`][parseInt(cellIndex.toString(), 10)];
1835
- const cellRenderer = new CellRenderer(this.parent.grid, this.parent.grid.serviceLocator);
1836
- const td = this.parent.getCellFromIndex(rowsObj[parseInt(j.toString(), 10)].index, cellIndex - indent);
1837
- cellRenderer.refreshTD(td, cell, rowsObj[parseInt(j.toString(), 10)].data, { index: rowsObj[parseInt(j.toString(), 10)][`${rowIdx}`] });
1838
- const treecell = this.parent.getRows()[parseInt(j.toString(), 10)]
1839
- .cells[parseInt(cellIndex.toString(), 10)];
1840
- this.cellRender({ data: rowsObj[parseInt(j.toString(), 10)].data, cell: treecell, column: cell.column });
1835
+ if (rows.length !== 0) {
1836
+ for (let j = 0; j < rowsObj.length; j++) {
1837
+ if (rowsObj[parseInt(j.toString(), 10)].isDataRow && !isNullOrUndefined(rowsObj[parseInt(j.toString(), 10)].index)) {
1838
+ const cell = rowsObj[parseInt(j.toString(), 10)][`${cells}`][parseInt(cellIndex.toString(), 10)];
1839
+ const cellRenderer = new CellRenderer(this.parent.grid, this.parent.grid.serviceLocator);
1840
+ const td = this.parent.getCellFromIndex(rowsObj[parseInt(j.toString(), 10)].index, cellIndex - indent);
1841
+ cellRenderer.refreshTD(td, cell, rowsObj[parseInt(j.toString(), 10)].data, { index: rowsObj[parseInt(j.toString(), 10)][`${rowIdx}`] });
1842
+ const treecell = this.parent.getRows()[parseInt(j.toString(), 10)]
1843
+ .cells[parseInt(cellIndex.toString(), 10)];
1844
+ this.cellRender({ data: rowsObj[parseInt(j.toString(), 10)].data, cell: treecell, column: cell.column });
1845
+ }
1841
1846
  }
1842
1847
  }
1843
1848
  });
@@ -4113,7 +4118,9 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
4113
4118
  const gridContent = this.element.getElementsByClassName('e-gridcontent')[0].childNodes[0];
4114
4119
  gridContent.setAttribute('tabindex', '0');
4115
4120
  const contentTable = this.element.getElementsByClassName('e-content')[0].querySelector('.e-table');
4116
- contentTable.setAttribute('role', 'treegrid');
4121
+ if (!isNullOrUndefined(contentTable)) {
4122
+ contentTable.setAttribute('role', 'treegrid');
4123
+ }
4117
4124
  if (this.isIndentEnabled) {
4118
4125
  this.refreshToolbarItems();
4119
4126
  }
@@ -5822,6 +5829,17 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
5822
5829
  const persist2 = 'mergeColumns';
5823
5830
  this.grid[`${persist2}`].apply(this, [storedColumn, columns]);
5824
5831
  }
5832
+ setFrozenCount() {
5833
+ const persist3 = 'setFrozenCount';
5834
+ this.grid[`${persist3}`].apply(this);
5835
+ }
5836
+ splitFrozenCount(columns) {
5837
+ const persist4 = 'splitFrozenCount';
5838
+ this.grid[`${persist4}`].apply(this, [columns]);
5839
+ }
5840
+ isFrozenGrid() {
5841
+ return this.grid.isFrozenGrid();
5842
+ }
5825
5843
  updateTreeGridModel() {
5826
5844
  this.setProperties({ filterSettings: getObject('properties', this.grid.filterSettings) }, true);
5827
5845
  this.setProperties({ pageSettings: getObject('properties', this.grid.pageSettings) }, true);