@syncfusion/ej2-treegrid 34.1.32 → 34.1.33

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.
@@ -8396,15 +8396,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
8396
8396
  var _this = this;
8397
8397
  var rows;
8398
8398
  var detailRow = row.nextElementSibling ? row.nextElementSibling.classList.contains('e-detailrow') ? row.nextElementSibling : null : null;
8399
- var childRecords;
8400
- if (this.enableInfiniteScrolling) {
8401
- childRecords = this.grid.getRowsObject().filter(function (e) { return e.data.parentUniqueID === record.uniqueID; });
8402
- }
8403
- else {
8404
- childRecords = this.grid.currentViewData.filter(function (e) {
8405
- return e.parentUniqueID === record.uniqueID;
8406
- });
8407
- }
8399
+ var childRecords = this.grid.currentViewData.filter(function (e) {
8400
+ return e.parentUniqueID === record.uniqueID;
8401
+ });
8408
8402
  if (this.isPixelHeight() && row.cells[0].classList.contains('e-lastrowcell')) {
8409
8403
  this.lastRowBorder(row, false);
8410
8404
  }
@@ -8486,11 +8480,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
8486
8480
  this.toggleRowVisibility(freezeRightRows[parseInt(i.toString(), 10)], displayAction);
8487
8481
  }
8488
8482
  this.notify('childRowExpand', { row: rows[parseInt(i.toString(), 10)] });
8489
- if ((!isNullOrUndefined(childRecords)) && (!isNullOrUndefined(childRecords[parseInt(i.toString(), 10)].childRecords) && childRecords[parseInt(i.toString(), 10)].childRecords.length > 0) && (action !== 'expand' ||
8490
- isNullOrUndefined(childRecords[parseInt(i.toString(), 10)].expanded) || childRecords[parseInt(i.toString(), 10)].expanded)) {
8491
- this.expandCollapse(action, rows[parseInt(i.toString(), 10)], childRecords[parseInt(i.toString(), 10)], true);
8483
+ var childRecord = !isNullOrUndefined(childRecords) ? childRecords[parseInt(i.toString(), 10)] : undefined;
8484
+ if (childRecord && (childRecord.childRecords && childRecord.childRecords.length > 0) && (action !== 'expand' ||
8485
+ isNullOrUndefined(childRecord.expanded) || childRecord.expanded)) {
8486
+ this.expandCollapse(action, rows[parseInt(i.toString(), 10)], childRecord, true);
8492
8487
  if (this.frozenColumns <= this.treeColumnIndex && !isNullOrUndefined(movableRows)) {
8493
- this.expandCollapse(action, movableRows[parseInt(i.toString(), 10)], childRecords[parseInt(i.toString(), 10)], true);
8488
+ this.expandCollapse(action, movableRows[parseInt(i.toString(), 10)], childRecord, true);
8494
8489
  }
8495
8490
  }
8496
8491
  }
@@ -17113,7 +17108,8 @@ var InfiniteScroll = /** @__PURE__ @class */ (function () {
17113
17108
  var previousPage = this.parent.grid.pageSettings.currentPage;
17114
17109
  var nextPage = Math.ceil(index / this.parent.grid.pageSettings.pageSize) + 1;
17115
17110
  var totalVisibleCount = this.visualData ? this.visualData.length : 0;
17116
- if ((previousPage >= this.maxPage) || (nextPage > this.maxPage)) {
17111
+ if ((totalVisibleCount > 0 && (index + 1) >= totalVisibleCount) ||
17112
+ (previousPage >= this.maxPage) || (nextPage > this.maxPage)) {
17117
17113
  return;
17118
17114
  }
17119
17115
  this.parent.grid.pageSettings.currentPage = nextPage;
@@ -17197,6 +17193,7 @@ var InfiniteScroll = /** @__PURE__ @class */ (function () {
17197
17193
  var initial = actions.some(function (value) { return value === actionArgs.requestType; });
17198
17194
  var initialRender = initial ? true : this.parent.initialRender ? true : false;
17199
17195
  this.visualData = visualData;
17196
+ this.maxPage = Math.ceil(visualData.length / this.parent.pageSettings.pageSize);
17200
17197
  pageingDetails.count = visualData.length;
17201
17198
  if (getValue('isPrinting', pageingDetails.actionArgs)) {
17202
17199
  pageingDetails.result = visualData;