@syncfusion/ej2-treegrid 20.4.44 → 20.4.49

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.
@@ -5453,6 +5453,17 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
5453
5453
  if (this.grid.columns.length !== this.columnModel.length) {
5454
5454
  this.stackedHeader = true;
5455
5455
  }
5456
+ if (this.stackedHeader && this.enablePersistence && this.allowResizing) {
5457
+ for (let i = 0; i < this.columns.length; i++) {
5458
+ if (!isNullOrUndefined(this.columns[parseInt(i.toString(), 10)].columns)) {
5459
+ for (let j = 0; j < this.columns[parseInt(i.toString(), 10)].columns.length; j++) {
5460
+ const stackedColumn = this.columns[parseInt(i.toString(), 10)].columns[parseInt(j.toString(), 10)];
5461
+ const currentColumn = this.grid.getColumnByField(stackedColumn.field);
5462
+ stackedColumn.width = currentColumn.width;
5463
+ }
5464
+ }
5465
+ }
5466
+ }
5456
5467
  if (!this.stackedHeader) {
5457
5468
  merge(this.columns, this.columnModel);
5458
5469
  }
@@ -6128,9 +6139,18 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
6128
6139
  if ((!isCountRequired(this) || childRecords.length) || action === 'collapse') {
6129
6140
  this.localExpand(action, row, record);
6130
6141
  }
6142
+ const lastrowIdx = this.getVisibleRecords()[this.getVisibleRecords().length - 1]['index'];
6143
+ const lastRow = this.getRowByIndex(lastrowIdx);
6144
+ if (this.grid.getContentTable().clientHeight <= this.grid.getContent().clientHeight && !isNullOrUndefined(lastRow) && !lastRow.cells[0].classList.contains('e-lastrowcell')) {
6145
+ this.lastRowBorder(lastRow, true);
6146
+ }
6131
6147
  }
6132
6148
  if (isCountRequired(this) && action === 'expand') {
6133
- this.dataResults.result = this.getCurrentViewRecords();
6149
+ const currentData = this.getCurrentViewRecords();
6150
+ const visibleRecords = currentData.filter((e) => {
6151
+ return getExpandStatus(this, e, this.parentData);
6152
+ });
6153
+ this.dataResults.result = visibleRecords;
6134
6154
  }
6135
6155
  if (!isNullOrUndefined(targetEle) && targetEle.closest('.e-treerowcell').classList.contains('e-cellselectionbackground')) {
6136
6156
  targetEle.closest('.e-treerowcell').classList.remove('e-cellselectionbackground');
@@ -13198,14 +13218,15 @@ class Freeze$1 {
13198
13218
  rows = args.detailrows;
13199
13219
  }
13200
13220
  for (let i = 0; i < rows.length; i++) {
13201
- const rData = this.parent.grid.getRowObjectFromUID(rows[parseInt(i.toString(), 10)].getAttribute('data-Uid')).data;
13202
- rows[parseInt(i.toString(), 10)].style.display = args.action;
13203
- if (freeze && frozenRightRows.length) {
13204
- frozenRightRows[parseInt(i.toString(), 10)].style.display = args.action;
13221
+ let row = rows[parseInt(i.toString(), 10)];
13222
+ const rData = this.parent.grid.getRowObjectFromUID(row.getAttribute('data-Uid')).data;
13223
+ if (!isNullOrUndefined(movableRows) && row.parentElement.firstElementChild.clientHeight > 0) {
13224
+ row.style.height = row.parentElement.firstElementChild.clientHeight + 'px';
13205
13225
  }
13226
+ row.style.display = args.action;
13206
13227
  const queryselector = args.action === 'none' ? '.e-treecolumn-container .e-treegridcollapse'
13207
13228
  : '.e-treecolumn-container .e-treegridexpand';
13208
- if (frozenrows[rows[parseInt(i.toString(), 10)].rowIndex].querySelector(queryselector)) {
13229
+ if (frozenrows[row.rowIndex].querySelector(queryselector)) {
13209
13230
  const cRow = [];
13210
13231
  for (let i = 0; i < movableRows.length; i++) {
13211
13232
  if (movableRows[parseInt(i.toString(), 10)].querySelector('.e-gridrowindex' + rData.index + 'level' + (rData.level + 1))) {