@syncfusion/ej2-treegrid 26.1.41 → 26.1.42

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 : 26.1.41
3
+ * version : 26.1.42
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. 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,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-treegrid@*",
3
- "_id": "@syncfusion/ej2-treegrid@26.1.40",
3
+ "_id": "@syncfusion/ej2-treegrid@26.1.41",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-FLSDQfoQPPsupYO9MJXtMfWLY77d98nS3kGQxBRoMIkotzYme8lIBz/YMXQA+h+owNWyryNZloaJaTx6Owt4Xg==",
5
+ "_integrity": "sha512-bEdBHXZDiDR2JGPI2rITLmXKpMDRRvVllnYUfcv3BangX4MF/JeFtegtHGa2XzX675KPpsyOe9SvwMjzaoEKKQ==",
6
6
  "_location": "/@syncfusion/ej2-treegrid",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -24,8 +24,8 @@
24
24
  "/@syncfusion/ej2-react-treegrid",
25
25
  "/@syncfusion/ej2-vue-treegrid"
26
26
  ],
27
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-26.1.40.tgz",
28
- "_shasum": "1604c276e7bfbbb1c64993484869265e35ab082f",
27
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-26.1.41.tgz",
28
+ "_shasum": "02a9f34ad00196ced1088eb5838061448392009e",
29
29
  "_spec": "@syncfusion/ej2-treegrid@*",
30
30
  "_where": "/jenkins/workspace/elease-automation_release_26.1.1/packages/included",
31
31
  "author": {
@@ -36,10 +36,10 @@
36
36
  },
37
37
  "bundleDependencies": false,
38
38
  "dependencies": {
39
- "@syncfusion/ej2-base": "~26.1.37",
40
- "@syncfusion/ej2-data": "~26.1.41",
41
- "@syncfusion/ej2-grids": "~26.1.41",
42
- "@syncfusion/ej2-popups": "~26.1.41"
39
+ "@syncfusion/ej2-base": "~26.1.42",
40
+ "@syncfusion/ej2-data": "~26.1.42",
41
+ "@syncfusion/ej2-grids": "~26.1.42",
42
+ "@syncfusion/ej2-popups": "~26.1.42"
43
43
  },
44
44
  "deprecated": false,
45
45
  "description": "Essential JS 2 TreeGrid Component",
@@ -76,6 +76,6 @@
76
76
  "url": "git+https://github.com/syncfusion/ej2-treegrid.git"
77
77
  },
78
78
  "typings": "index.d.ts",
79
- "version": "26.1.41",
79
+ "version": "26.1.42",
80
80
  "sideEffects": false
81
81
  }
@@ -19,6 +19,7 @@ export declare class DataManipulation {
19
19
  private isSelfReference;
20
20
  private isSortAction;
21
21
  private infiniteScrollData;
22
+ private preCurrentPage;
22
23
  constructor(grid: TreeGrid);
23
24
  /**
24
25
  * @hidden
@@ -18,6 +18,7 @@ var DataManipulation = /** @class */ (function () {
18
18
  this.hierarchyData = [];
19
19
  this.storedIndex = -1;
20
20
  this.sortedData = [];
21
+ this.preCurrentPage = -1;
21
22
  this.isSortAction = false;
22
23
  this.addEventListener();
23
24
  this.dataResults = {};
@@ -349,7 +350,7 @@ var DataManipulation = /** @class */ (function () {
349
350
  idMappingValue = rowDetails.record[this.parent.idMapping].toString();
350
351
  }
351
352
  if (this.parent.enableVirtualization && rowDetails.action === 'remoteExpand') {
352
- qry.take(this.parent.pageSettings.pageSize);
353
+ qry.take(this.parent.grid.pageSettings.pageSize);
353
354
  var expandDetail = [];
354
355
  expandDetail.push('ExpandingAction', idMappingValue.toString());
355
356
  qry.expand(expandDetail);
@@ -537,6 +538,17 @@ var DataManipulation = /** @class */ (function () {
537
538
  }
538
539
  datas.splice(inx + r + 1, 0, result[parseInt(r.toString(), 10)]);
539
540
  }
541
+ if (datas.length > result.length &&
542
+ datas.length !== _this.parent.grid.pageSettings.pageSize + (_this.parent.grid.contentModule).getBlockSize() &&
543
+ _this.parent.enableVirtualization && rowDetails.action === 'remoteExpand') {
544
+ if ((_this.preCurrentPage > 1 || _this.parent.grid.pageSettings.currentPage > 1)) {
545
+ datas = datas.slice(0, _this.parent.grid.pageSettings.pageSize + (_this.parent.grid.contentModule).getBlockSize());
546
+ }
547
+ else {
548
+ datas = datas.slice(0, _this.parent.grid.pageSettings.pageSize);
549
+ }
550
+ _this.preCurrentPage = _this.parent.grid.pageSettings.currentPage;
551
+ }
540
552
  setValue('result', datas, e);
541
553
  setValue('action', 'beforecontentrender', e);
542
554
  _this.parent.trigger(events.actionComplete, e);
@@ -883,7 +883,7 @@ var TreeGrid = /** @class */ (function (_super) {
883
883
  || (/[0-9]$/.test(this.height.toString()) && /[px]$/.test(this.height.toString()))) {
884
884
  failureCases.push('column width and height should be in pixels');
885
885
  }
886
- if (!isNullOrUndefined(this.childMapping) && !isNullOrUndefined(this.idMapping)) {
886
+ if ((this.childMapping !== 'Children') && !isNullOrUndefined(this.idMapping)) {
887
887
  failureCases.push('Both IdMapping and ChildMapping should not be used together for tree grid rendering.');
888
888
  }
889
889
  if ((!isNullOrUndefined(this.idMapping) && (isNullOrUndefined(this.parentIdMapping))) ||
@@ -94,7 +94,13 @@ var TreeVirtualRowModelGenerator = /** @class */ (function (_super) {
94
94
  else if (action === 'virtualscroll' && this.cache[parseInt(currentPage.toString(), 10)] &&
95
95
  this.cache[parseInt(currentPage.toString(), 10)].length >
96
96
  (this.parent.contentModule).getBlockSize()) {
97
- delete this.cache[parseInt(currentPage.toString(), 10)];
97
+ if (this.cache[parseInt(currentPage.toString(), 10)].length > (this.parent.contentModule).getBlockSize()) {
98
+ this.cache[parseInt(currentPage.toString(), 10)] =
99
+ this.cache[parseInt(currentPage.toString(), 10)].slice(0, (this.parent.contentModule).getBlockSize());
100
+ }
101
+ else {
102
+ delete this.cache[parseInt(currentPage.toString(), 10)];
103
+ }
98
104
  }
99
105
  }
100
106
  else {