@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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 34.1.31
3
+ * version : 34.1.33
4
4
  * Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncfusion/ej2-treegrid",
3
- "version": "34.1.31",
3
+ "version": "34.1.33",
4
4
  "description": "Essential JS 2 TreeGrid Component",
5
5
  "author": "Syncfusion Inc.",
6
6
  "license": "SEE LICENSE IN license",
@@ -9,8 +9,8 @@
9
9
  "es2015": "./dist/es6/ej2-treegrid.es5.js",
10
10
  "dependencies": {
11
11
  "@syncfusion/ej2-base": "~34.1.30",
12
- "@syncfusion/ej2-data": "~34.1.29",
13
- "@syncfusion/ej2-grids": "~34.1.31",
12
+ "@syncfusion/ej2-data": "~34.1.32",
13
+ "@syncfusion/ej2-grids": "~34.1.33",
14
14
  "@syncfusion/ej2-popups": "~34.1.29"
15
15
  },
16
16
  "devDependencies": {},
@@ -93,7 +93,9 @@ var InfiniteScroll = /** @class */ (function () {
93
93
  var index = getRowIndexFromElement(rows[rows.length - 1]);
94
94
  var previousPage = this.parent.grid.pageSettings.currentPage;
95
95
  var nextPage = Math.ceil(index / this.parent.grid.pageSettings.pageSize) + 1;
96
- if ((previousPage >= this.maxPage) || (nextPage > this.maxPage)) {
96
+ var totalVisibleCount = this.visualData ? this.visualData.length : 0;
97
+ if ((totalVisibleCount > 0 && (index + 1) >= totalVisibleCount) ||
98
+ (previousPage >= this.maxPage) || (nextPage > this.maxPage)) {
97
99
  return;
98
100
  }
99
101
  this.parent.grid.pageSettings.currentPage = nextPage;
@@ -177,6 +179,7 @@ var InfiniteScroll = /** @class */ (function () {
177
179
  var initial = actions.some(function (value) { return value === actionArgs.requestType; });
178
180
  var initialRender = initial ? true : this.parent.initialRender ? true : false;
179
181
  this.visualData = visualData;
182
+ this.maxPage = Math.ceil(visualData.length / this.parent.pageSettings.pageSize);
180
183
  pageingDetails.count = visualData.length;
181
184
  if (getValue('isPrinting', pageingDetails.actionArgs)) {
182
185
  pageingDetails.result = visualData;
@@ -1454,10 +1454,11 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
1454
1454
  * Called internally if any of the property value changed.
1455
1455
  *
1456
1456
  * @param {TreeGridModel} newProp - properties details which has to be modified
1457
+ * @param {TreeGridModel} oldProp - properties details which previously existed
1457
1458
  * @hidden
1458
1459
  * @returns {void}
1459
1460
  */
1460
- onPropertyChanged(newProp: TreeGridModel): void;
1461
+ onPropertyChanged(newProp: TreeGridModel, oldProp: TreeGridModel): void;
1461
1462
  private updateTreeColumnTextAlign;
1462
1463
  /**
1463
1464
  * Destroys the TreeGrid component by detaching event handlers,
@@ -1937,10 +1937,11 @@ var TreeGrid = /** @class */ (function (_super) {
1937
1937
  * Called internally if any of the property value changed.
1938
1938
  *
1939
1939
  * @param {TreeGridModel} newProp - properties details which has to be modified
1940
+ * @param {TreeGridModel} oldProp - properties details which previously existed
1940
1941
  * @hidden
1941
1942
  * @returns {void}
1942
1943
  */
1943
- TreeGrid.prototype.onPropertyChanged = function (newProp) {
1944
+ TreeGrid.prototype.onPropertyChanged = function (newProp, oldProp) {
1944
1945
  var properties = Object.keys(newProp);
1945
1946
  var requireRefresh = false;
1946
1947
  var refreshComponent = false;
@@ -1997,6 +1998,10 @@ var TreeGrid = /** @class */ (function (_super) {
1997
1998
  case 'filterSettings':
1998
1999
  if (!this.initialRender) {
1999
2000
  this.grid.filterSettings = getActualProperties(this.filterSettings);
2001
+ }
2002
+ if (newProp.filterSettings && !isNullOrUndefined(newProp.filterSettings.hierarchyMode)
2003
+ && oldProp.filterSettings && !isNullOrUndefined(oldProp.filterSettings.hierarchyMode)
2004
+ && newProp.filterSettings.hierarchyMode !== oldProp.filterSettings.hierarchyMode) {
2000
2005
  this.refresh();
2001
2006
  }
2002
2007
  break;
@@ -4139,15 +4144,9 @@ var TreeGrid = /** @class */ (function (_super) {
4139
4144
  var _this = this;
4140
4145
  var rows;
4141
4146
  var detailRow = row.nextElementSibling ? row.nextElementSibling.classList.contains('e-detailrow') ? row.nextElementSibling : null : null;
4142
- var childRecords;
4143
- if (this.enableInfiniteScrolling) {
4144
- childRecords = this.grid.getRowsObject().filter(function (e) { return e.data.parentUniqueID === record.uniqueID; });
4145
- }
4146
- else {
4147
- childRecords = this.grid.currentViewData.filter(function (e) {
4148
- return e.parentUniqueID === record.uniqueID;
4149
- });
4150
- }
4147
+ var childRecords = this.grid.currentViewData.filter(function (e) {
4148
+ return e.parentUniqueID === record.uniqueID;
4149
+ });
4151
4150
  if (this.isPixelHeight() && row.cells[0].classList.contains('e-lastrowcell')) {
4152
4151
  this.lastRowBorder(row, false);
4153
4152
  }
@@ -4229,11 +4228,12 @@ var TreeGrid = /** @class */ (function (_super) {
4229
4228
  this.toggleRowVisibility(freezeRightRows[parseInt(i.toString(), 10)], displayAction);
4230
4229
  }
4231
4230
  this.notify('childRowExpand', { row: rows[parseInt(i.toString(), 10)] });
4232
- if ((!isNullOrUndefined(childRecords)) && (!isNullOrUndefined(childRecords[parseInt(i.toString(), 10)].childRecords) && childRecords[parseInt(i.toString(), 10)].childRecords.length > 0) && (action !== 'expand' ||
4233
- isNullOrUndefined(childRecords[parseInt(i.toString(), 10)].expanded) || childRecords[parseInt(i.toString(), 10)].expanded)) {
4234
- this.expandCollapse(action, rows[parseInt(i.toString(), 10)], childRecords[parseInt(i.toString(), 10)], true);
4231
+ var childRecord = !isNullOrUndefined(childRecords) ? childRecords[parseInt(i.toString(), 10)] : undefined;
4232
+ if (childRecord && (childRecord.childRecords && childRecord.childRecords.length > 0) && (action !== 'expand' ||
4233
+ isNullOrUndefined(childRecord.expanded) || childRecord.expanded)) {
4234
+ this.expandCollapse(action, rows[parseInt(i.toString(), 10)], childRecord, true);
4235
4235
  if (this.frozenColumns <= this.treeColumnIndex && !isNullOrUndefined(movableRows)) {
4236
- this.expandCollapse(action, movableRows[parseInt(i.toString(), 10)], childRecords[parseInt(i.toString(), 10)], true);
4236
+ this.expandCollapse(action, movableRows[parseInt(i.toString(), 10)], childRecord, true);
4237
4237
  }
4238
4238
  }
4239
4239
  }