@syncfusion/ej2-treegrid 20.4.48 → 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.
@@ -5734,6 +5734,17 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5734
5734
  if (this.grid.columns.length !== this.columnModel.length) {
5735
5735
  this.stackedHeader = true;
5736
5736
  }
5737
+ if (this.stackedHeader && this.enablePersistence && this.allowResizing) {
5738
+ for (var i = 0; i < this.columns.length; i++) {
5739
+ if (!isNullOrUndefined(this.columns[parseInt(i.toString(), 10)].columns)) {
5740
+ for (var j = 0; j < this.columns[parseInt(i.toString(), 10)].columns.length; j++) {
5741
+ var stackedColumn = this.columns[parseInt(i.toString(), 10)].columns[parseInt(j.toString(), 10)];
5742
+ var currentColumn = this.grid.getColumnByField(stackedColumn.field);
5743
+ stackedColumn.width = currentColumn.width;
5744
+ }
5745
+ }
5746
+ }
5747
+ }
5737
5748
  if (!this.stackedHeader) {
5738
5749
  merge(this.columns, this.columnModel);
5739
5750
  }
@@ -6337,6 +6348,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6337
6348
  this.isCollapseAll = false;
6338
6349
  };
6339
6350
  TreeGrid.prototype.expandCollapse = function (action, row, record, isChild) {
6351
+ var _this = this;
6340
6352
  var expandingArgs = { row: row, data: record, childData: [], requestType: action };
6341
6353
  var childRecords = this.getCurrentViewRecords().filter(function (e) {
6342
6354
  return e.parentUniqueID === record.uniqueID;
@@ -6427,7 +6439,11 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6427
6439
  }
6428
6440
  }
6429
6441
  if (isCountRequired(this) && action === 'expand') {
6430
- this.dataResults.result = this.getCurrentViewRecords();
6442
+ var currentData = this.getCurrentViewRecords();
6443
+ var visibleRecords = currentData.filter(function (e) {
6444
+ return getExpandStatus(_this, e, _this.parentData);
6445
+ });
6446
+ this.dataResults.result = visibleRecords;
6431
6447
  }
6432
6448
  if (!isNullOrUndefined(targetEle) && targetEle.closest('.e-treerowcell').classList.contains('e-cellselectionbackground')) {
6433
6449
  targetEle.closest('.e-treerowcell').classList.remove('e-cellselectionbackground');
@@ -13655,14 +13671,15 @@ var Freeze$1 = /** @__PURE__ @class */ (function () {
13655
13671
  rows = args.detailrows;
13656
13672
  }
13657
13673
  for (var i = 0; i < rows.length; i++) {
13658
- var rData = this.parent.grid.getRowObjectFromUID(rows[parseInt(i.toString(), 10)].getAttribute('data-Uid')).data;
13659
- rows[parseInt(i.toString(), 10)].style.display = args.action;
13660
- if (freeze && frozenRightRows.length) {
13661
- frozenRightRows[parseInt(i.toString(), 10)].style.display = args.action;
13674
+ var row = rows[parseInt(i.toString(), 10)];
13675
+ var rData = this.parent.grid.getRowObjectFromUID(row.getAttribute('data-Uid')).data;
13676
+ if (!isNullOrUndefined(movableRows) && row.parentElement.firstElementChild.clientHeight > 0) {
13677
+ row.style.height = row.parentElement.firstElementChild.clientHeight + 'px';
13662
13678
  }
13679
+ row.style.display = args.action;
13663
13680
  var queryselector = args.action === 'none' ? '.e-treecolumn-container .e-treegridcollapse'
13664
13681
  : '.e-treecolumn-container .e-treegridexpand';
13665
- if (frozenrows[rows[parseInt(i.toString(), 10)].rowIndex].querySelector(queryselector)) {
13682
+ if (frozenrows[row.rowIndex].querySelector(queryselector)) {
13666
13683
  var cRow = [];
13667
13684
  for (var i_1 = 0; i_1 < movableRows.length; i_1++) {
13668
13685
  if (movableRows[parseInt(i_1.toString(), 10)].querySelector('.e-gridrowindex' + rData.index + 'level' + (rData.level + 1))) {