@syncfusion/ej2-treegrid 20.4.40 → 20.4.44

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.
@@ -1853,7 +1853,7 @@ var Render = /** @__PURE__ @class */ (function () {
1853
1853
  var portals = 'portals';
1854
1854
  var renderReactTemplates = 'renderReactTemplates';
1855
1855
  if (this.parent.isReact && typeof (args.column.template) !== 'string') {
1856
- args.column["" + templateFn](args.data, this.parent, 'template', tempID, null, null, cellElement);
1856
+ args.column["" + templateFn](args.data, this.parent, 'columnTemplate', tempID, null, null, cellElement);
1857
1857
  if (isNullOrUndefined(this.parent.grid["" + portals])) {
1858
1858
  this.parent.grid["" + portals] = this.parent["" + portals];
1859
1859
  }
@@ -2196,7 +2196,7 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
2196
2196
  && this.parent.grid.aggregates.length && this.parent.grid.sortSettings.columns.length === 0
2197
2197
  && this.parent.grid.filterSettings.columns.length === 0 && !this.parent.grid.searchSettings.key.length) {
2198
2198
  var query = 'query';
2199
- var summaryQuery = args["" + query].queries.filter(function (q) { q.fn === 'onAggregates'; });
2199
+ var summaryQuery = args["" + query].queries.filter(function (q) { return q.fn === 'onAggregates'; });
2200
2200
  args.result = this.parent.summaryModule.calculateSummaryValue(summaryQuery, this.parent.flatData, true);
2201
2201
  }
2202
2202
  this.parent.notify('updateResults', args);
@@ -2263,9 +2263,9 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
2263
2263
  qry.isCountRequired = true;
2264
2264
  if (this.parent.enableVirtualization && rowDetails.action === 'remoteExpand') {
2265
2265
  qry.take(this.parent.pageSettings.pageSize);
2266
- var expandDetail_1 = [];
2267
- expandDetail_1.push('ExpandingAction', rowDetails.record[this.parent.idMapping]);
2268
- qry.expand(expandDetail_1);
2266
+ var expandDetail = [];
2267
+ expandDetail.push('ExpandingAction', rowDetails.record[this.parent.idMapping]);
2268
+ qry.expand(expandDetail);
2269
2269
  }
2270
2270
  else if (this.parent.enableVirtualization && rowDetails.action === 'collapse') {
2271
2271
  qry.take(this.parent.grid.pageSettings.pageSize);
@@ -4918,7 +4918,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4918
4918
  }
4919
4919
  var treeGridColumn;
4920
4920
  var gridColumn;
4921
- if (this.columnModel.length == 0) {
4921
+ if (this.columnModel.length === 0) {
4922
4922
  index = index === 0 ? -1 : index;
4923
4923
  }
4924
4924
  var gridColumnCollection = [];
@@ -6421,6 +6421,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6421
6421
  this.localExpand(action, row, record);
6422
6422
  }
6423
6423
  }
6424
+ if (isCountRequired(this) && action === 'expand') {
6425
+ this.dataResults.result = this.getCurrentViewRecords();
6426
+ }
6424
6427
  if (!isNullOrUndefined(targetEle) && targetEle.closest('.e-treerowcell').classList.contains('e-cellselectionbackground')) {
6425
6428
  targetEle.closest('.e-treerowcell').classList.remove('e-cellselectionbackground');
6426
6429
  targetEle.closest('.e-treerowcell').removeAttribute('aria-selected');
@@ -6612,8 +6615,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6612
6615
  return e.uniqueID === record.uniqueID;
6613
6616
  });
6614
6617
  var currentIndex = currentViewData.indexOf(currentRecord[0]);
6615
- if (!isNullOrUndefined(gridRowsObject[currentIndex].visible) && gridRowsObject[currentIndex].visible !== false) {
6616
- gridRowsObject[currentIndex].visible = true;
6618
+ if (!isNullOrUndefined(gridRowsObject[parseInt(currentIndex.toString(), 10)].visible) &&
6619
+ gridRowsObject[parseInt(currentIndex.toString(), 10)].visible !== false) {
6620
+ gridRowsObject[parseInt(currentIndex.toString(), 10)].visible = true;
6617
6621
  }
6618
6622
  var detailrows = gridRows.filter(function (r) {
6619
6623
  return r.classList.contains('e-griddetailrowindex' + record.index + 'level' + (record.level + 1));
@@ -6622,13 +6626,14 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6622
6626
  if (!isNullOrUndefined(rows[parseInt(i.toString(), 10)])) {
6623
6627
  rows[parseInt(i.toString(), 10)].style.display = displayAction;
6624
6628
  }
6625
- if (!isNullOrUndefined(rows[parseInt(i.toString(), 10)]) && !this.allowPaging && !(this.enableVirtualization || this.enableInfiniteScrolling || isRemoteData(this) || isCountRequired(this))) {
6626
- gridRowsObject[rows[parseInt(i.toString(), 10)].rowIndex].visible = displayAction != 'none' ? true : false;
6629
+ if (!isNullOrUndefined(rows[parseInt(i.toString(), 10)]) && !this.allowPaging && !(this.enableVirtualization
6630
+ || this.enableInfiniteScrolling || isRemoteData(this) || isCountRequired(this))) {
6631
+ gridRowsObject[rows[parseInt(i.toString(), 10)].rowIndex].visible = displayAction !== 'none' ? true : false;
6627
6632
  var parentRecord = currentViewData.filter(function (e) {
6628
6633
  return e.uniqueID === currentRecord[0].parentUniqueID;
6629
6634
  });
6630
6635
  if (!isNullOrUndefined(parentRecord[0]) && gridRows[currentViewData.indexOf(parentRecord[0])].getElementsByClassName('e-treegridcollapse').length) {
6631
- gridRowsObject[currentIndex].visible = false;
6636
+ gridRowsObject[parseInt(currentIndex.toString(), 10)].visible = false;
6632
6637
  }
6633
6638
  }
6634
6639
  if (!isNullOrUndefined(movableRows)) {
@@ -6647,12 +6652,14 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6647
6652
  }
6648
6653
  }
6649
6654
  for (var i = 0; i < detailrows.length; i++) {
6650
- if (!isNullOrUndefined(detailrows[parseInt(i.toString(), 10)]) && !this.allowPaging && !(this.enableVirtualization || this.enableInfiniteScrolling || isRemoteData(this) || isCountRequired(this))) {
6651
- gridRowsObject[detailrows[parseInt(i.toString(), 10)].rowIndex].visible = displayAction != 'none' ? true : false;
6655
+ if (!isNullOrUndefined(detailrows[parseInt(i.toString(), 10)]) && !this.allowPaging && !(this.enableVirtualization
6656
+ || this.enableInfiniteScrolling || isRemoteData(this) || isCountRequired(this))) {
6657
+ gridRowsObject[detailrows[parseInt(i.toString(), 10)].rowIndex].visible = displayAction !== 'none' ? true : false;
6652
6658
  detailrows[parseInt(i.toString(), 10)].style.display = displayAction;
6653
6659
  }
6654
6660
  }
6655
- if (!this.allowPaging && !(this.enableVirtualization || this.enableInfiniteScrolling || isRemoteData(this) || isCountRequired(this))) {
6661
+ if (!this.allowPaging && !(this.enableVirtualization || this.enableInfiniteScrolling || isRemoteData(this)
6662
+ || isCountRequired(this))) {
6656
6663
  this.grid.notify('refresh-Expand-and-Collapse', { rows: this.grid.getRowsObject() });
6657
6664
  }
6658
6665
  };