@syncfusion/ej2-treegrid 20.4.49 → 20.4.54

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.
@@ -1728,7 +1728,7 @@ class Render {
1728
1728
  }
1729
1729
  else {
1730
1730
  const str = 'isStringTemplate';
1731
- const result = args.column[`${templateFn}`](extend$1({ 'index': '' }, args.data), this.parent, 'template', tempID, this.parent[`${str}`]);
1731
+ const result = args.column[`${templateFn}`](extend$1({ 'index': '' }, args.data), this.parent, 'template', tempID, this.parent[`${str}`], undefined, undefined, this.parent['root']);
1732
1732
  appendChildren(cellElement, result);
1733
1733
  }
1734
1734
  delete args.column.template;
@@ -2120,13 +2120,13 @@ class DataManipulation {
2120
2120
  if (this.parent.enableVirtualization && rowDetails.action === 'remoteExpand') {
2121
2121
  qry.take(this.parent.pageSettings.pageSize);
2122
2122
  const expandDetail = [];
2123
- expandDetail.push('ExpandingAction', rowDetails.record[this.parent.idMapping]);
2123
+ expandDetail.push('ExpandingAction', parseInt(rowDetails.record[this.parent.idMapping], 10).toString());
2124
2124
  qry.expand(expandDetail);
2125
2125
  }
2126
2126
  else if (this.parent.enableVirtualization && rowDetails.action === 'collapse') {
2127
2127
  qry.take(this.parent.grid.pageSettings.pageSize);
2128
2128
  const expandDetail = [];
2129
- expandDetail.push('CollapsingAction', rowDetails.record[this.parent.idMapping]);
2129
+ expandDetail.push('CollapsingAction', parseInt(rowDetails.record[this.parent.idMapping], 10).toString());
2130
2130
  qry.expand(expandDetail);
2131
2131
  }
2132
2132
  qry.where(this.parent.parentIdMapping, 'equal', rowDetails.record[this.parent.idMapping]);
@@ -5453,7 +5453,7 @@ 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) {
5456
+ if (this.stackedHeader && this.allowResizing) {
5457
5457
  for (let i = 0; i < this.columns.length; i++) {
5458
5458
  if (!isNullOrUndefined(this.columns[parseInt(i.toString(), 10)].columns)) {
5459
5459
  for (let j = 0; j < this.columns[parseInt(i.toString(), 10)].columns.length; j++) {
@@ -5462,6 +5462,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
5462
5462
  stackedColumn.width = currentColumn.width;
5463
5463
  }
5464
5464
  }
5465
+ else if (!isNullOrUndefined(this.columns[parseInt(i.toString(), 10)].field)) {
5466
+ const currentColumn = this.grid.getColumnByField(this.columns[parseInt(i.toString(), 10)].field);
5467
+ this.columns[parseInt(i.toString(), 10)].width = currentColumn.width;
5468
+ }
5465
5469
  }
5466
5470
  }
5467
5471
  if (!this.stackedHeader) {
@@ -10424,7 +10428,7 @@ class BatchEdit {
10424
10428
  this.batchAddedRecords = this.batchRecords = this.batchAddRowRecord = this.batchDeletedRecords = this.currentViewRecords = [];
10425
10429
  }
10426
10430
  cellSaved(args) {
10427
- let actualCellIndex = args.cell.cellIndex;
10431
+ let actualCellIndex = args.column.index;
10428
10432
  const frozenCols = this.parent.frozenColumns || this.parent.getFrozenColumns();
10429
10433
  if (frozenCols && args.columnObject.index > frozenCols) {
10430
10434
  actualCellIndex = actualCellIndex + frozenCols;
@@ -10435,13 +10439,13 @@ class BatchEdit {
10435
10439
  const colCount = this.parent.getFrozenLeftColumnsCount() + actualCellIndex;
10436
10440
  if (colCount === this.parent.treeColumnIndex) {
10437
10441
  this.parent.renderModule.cellRender({ data: args.rowData, cell: args.cell,
10438
- column: this.parent.grid.getColumnByIndex(args.cell.cellIndex)
10442
+ column: this.parent.grid.getColumnByIndex(args.column.index)
10439
10443
  });
10440
10444
  }
10441
10445
  }
10442
10446
  else if (actualCellIndex === this.parent.treeColumnIndex) {
10443
10447
  this.parent.renderModule.cellRender({ data: args.rowData, cell: args.cell,
10444
- column: this.parent.grid.getColumnByIndex(args.cell.cellIndex)
10448
+ column: this.parent.grid.getColumnByIndex(args.column.index)
10445
10449
  });
10446
10450
  }
10447
10451
  if (this.isAdd && this.parent.editSettings.mode === 'Batch' && this.parent.editSettings.newRowPosition !== 'Bottom') {
@@ -13183,10 +13187,6 @@ class Freeze$1 {
13183
13187
  getValue('addRenderer', renderer)
13184
13188
  .apply(renderer, [RenderType.Content, new VirtualTreeFreezeRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
13185
13189
  }
13186
- else {
13187
- getValue('addRenderer', renderer)
13188
- .apply(renderer, [RenderType.Content, new FreezeContentRender(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
13189
- }
13190
13190
  }
13191
13191
  if (this.parent.getFrozenLeftColumnsCount() || this.parent.getFrozenRightColumnsCount()) {
13192
13192
  getValue('addRenderer', renderer)