@syncfusion/ej2-treegrid 34.1.31 → 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.
@@ -6189,10 +6189,11 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6189
6189
  * Called internally if any of the property value changed.
6190
6190
  *
6191
6191
  * @param {TreeGridModel} newProp - properties details which has to be modified
6192
+ * @param {TreeGridModel} oldProp - properties details which previously existed
6192
6193
  * @hidden
6193
6194
  * @returns {void}
6194
6195
  */
6195
- TreeGrid.prototype.onPropertyChanged = function (newProp) {
6196
+ TreeGrid.prototype.onPropertyChanged = function (newProp, oldProp) {
6196
6197
  var properties = Object.keys(newProp);
6197
6198
  var requireRefresh = false;
6198
6199
  var refreshComponent = false;
@@ -6249,6 +6250,10 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6249
6250
  case 'filterSettings':
6250
6251
  if (!this.initialRender) {
6251
6252
  this.grid.filterSettings = getActualProperties(this.filterSettings);
6253
+ }
6254
+ if (newProp.filterSettings && !isNullOrUndefined(newProp.filterSettings.hierarchyMode)
6255
+ && oldProp.filterSettings && !isNullOrUndefined(oldProp.filterSettings.hierarchyMode)
6256
+ && newProp.filterSettings.hierarchyMode !== oldProp.filterSettings.hierarchyMode) {
6252
6257
  this.refresh();
6253
6258
  }
6254
6259
  break;
@@ -8391,15 +8396,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
8391
8396
  var _this = this;
8392
8397
  var rows;
8393
8398
  var detailRow = row.nextElementSibling ? row.nextElementSibling.classList.contains('e-detailrow') ? row.nextElementSibling : null : null;
8394
- var childRecords;
8395
- if (this.enableInfiniteScrolling) {
8396
- childRecords = this.grid.getRowsObject().filter(function (e) { return e.data.parentUniqueID === record.uniqueID; });
8397
- }
8398
- else {
8399
- childRecords = this.grid.currentViewData.filter(function (e) {
8400
- return e.parentUniqueID === record.uniqueID;
8401
- });
8402
- }
8399
+ var childRecords = this.grid.currentViewData.filter(function (e) {
8400
+ return e.parentUniqueID === record.uniqueID;
8401
+ });
8403
8402
  if (this.isPixelHeight() && row.cells[0].classList.contains('e-lastrowcell')) {
8404
8403
  this.lastRowBorder(row, false);
8405
8404
  }
@@ -8481,11 +8480,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
8481
8480
  this.toggleRowVisibility(freezeRightRows[parseInt(i.toString(), 10)], displayAction);
8482
8481
  }
8483
8482
  this.notify('childRowExpand', { row: rows[parseInt(i.toString(), 10)] });
8484
- if ((!isNullOrUndefined(childRecords)) && (!isNullOrUndefined(childRecords[parseInt(i.toString(), 10)].childRecords) && childRecords[parseInt(i.toString(), 10)].childRecords.length > 0) && (action !== 'expand' ||
8485
- isNullOrUndefined(childRecords[parseInt(i.toString(), 10)].expanded) || childRecords[parseInt(i.toString(), 10)].expanded)) {
8486
- 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);
8487
8487
  if (this.frozenColumns <= this.treeColumnIndex && !isNullOrUndefined(movableRows)) {
8488
- 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);
8489
8489
  }
8490
8490
  }
8491
8491
  }
@@ -17107,7 +17107,9 @@ var InfiniteScroll = /** @__PURE__ @class */ (function () {
17107
17107
  var index = getRowIndexFromElement(rows[rows.length - 1]);
17108
17108
  var previousPage = this.parent.grid.pageSettings.currentPage;
17109
17109
  var nextPage = Math.ceil(index / this.parent.grid.pageSettings.pageSize) + 1;
17110
- if ((previousPage >= this.maxPage) || (nextPage > this.maxPage)) {
17110
+ var totalVisibleCount = this.visualData ? this.visualData.length : 0;
17111
+ if ((totalVisibleCount > 0 && (index + 1) >= totalVisibleCount) ||
17112
+ (previousPage >= this.maxPage) || (nextPage > this.maxPage)) {
17111
17113
  return;
17112
17114
  }
17113
17115
  this.parent.grid.pageSettings.currentPage = nextPage;
@@ -17191,6 +17193,7 @@ var InfiniteScroll = /** @__PURE__ @class */ (function () {
17191
17193
  var initial = actions.some(function (value) { return value === actionArgs.requestType; });
17192
17194
  var initialRender = initial ? true : this.parent.initialRender ? true : false;
17193
17195
  this.visualData = visualData;
17196
+ this.maxPage = Math.ceil(visualData.length / this.parent.pageSettings.pageSize);
17194
17197
  pageingDetails.count = visualData.length;
17195
17198
  if (getValue('isPrinting', pageingDetails.actionArgs)) {
17196
17199
  pageingDetails.result = visualData;