@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.
@@ -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;
@@ -6420,9 +6432,18 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6420
6432
  if ((!isCountRequired(this) || childRecords.length) || action === 'collapse') {
6421
6433
  this.localExpand(action, row, record);
6422
6434
  }
6435
+ var lastrowIdx = this.getVisibleRecords()[this.getVisibleRecords().length - 1]['index'];
6436
+ var lastRow = this.getRowByIndex(lastrowIdx);
6437
+ if (this.grid.getContentTable().clientHeight <= this.grid.getContent().clientHeight && !isNullOrUndefined(lastRow) && !lastRow.cells[0].classList.contains('e-lastrowcell')) {
6438
+ this.lastRowBorder(lastRow, true);
6439
+ }
6423
6440
  }
6424
6441
  if (isCountRequired(this) && action === 'expand') {
6425
- 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;
6426
6447
  }
6427
6448
  if (!isNullOrUndefined(targetEle) && targetEle.closest('.e-treerowcell').classList.contains('e-cellselectionbackground')) {
6428
6449
  targetEle.closest('.e-treerowcell').classList.remove('e-cellselectionbackground');
@@ -13650,14 +13671,15 @@ var Freeze$1 = /** @__PURE__ @class */ (function () {
13650
13671
  rows = args.detailrows;
13651
13672
  }
13652
13673
  for (var i = 0; i < rows.length; i++) {
13653
- var rData = this.parent.grid.getRowObjectFromUID(rows[parseInt(i.toString(), 10)].getAttribute('data-Uid')).data;
13654
- rows[parseInt(i.toString(), 10)].style.display = args.action;
13655
- if (freeze && frozenRightRows.length) {
13656
- 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';
13657
13678
  }
13679
+ row.style.display = args.action;
13658
13680
  var queryselector = args.action === 'none' ? '.e-treecolumn-container .e-treegridcollapse'
13659
13681
  : '.e-treecolumn-container .e-treegridexpand';
13660
- if (frozenrows[rows[parseInt(i.toString(), 10)].rowIndex].querySelector(queryselector)) {
13682
+ if (frozenrows[row.rowIndex].querySelector(queryselector)) {
13661
13683
  var cRow = [];
13662
13684
  for (var i_1 = 0; i_1 < movableRows.length; i_1++) {
13663
13685
  if (movableRows[parseInt(i_1.toString(), 10)].querySelector('.e-gridrowindex' + rData.index + 'level' + (rData.level + 1))) {