@syncfusion/ej2-treegrid 26.1.40 → 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.40
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.39",
3
+ "_id": "@syncfusion/ej2-treegrid@26.1.41",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-qrXXmFlFp24CGLgoAnEegsxxMxcIf5hIlyqKgWv7OesUA3FRaVEEsVl24vIamY5CJQe31xX3kTV9ymhGECravA==",
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.39.tgz",
28
- "_shasum": "8390133d51011d61d53746a0034e025b70adadb2",
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.40",
41
- "@syncfusion/ej2-grids": "~26.1.40",
42
- "@syncfusion/ej2-popups": "~26.1.38"
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",
@@ -52,10 +52,20 @@
52
52
  "JavaScript",
53
53
  "TypeScript",
54
54
  "treelist",
55
- "tree-data",
56
55
  "tree-table",
56
+ "tree-data",
57
+ "treegrid",
57
58
  "table",
58
- "treegrid"
59
+ "tree-grid-component",
60
+ "tree-table-control",
61
+ "hierarchy-table",
62
+ "nested-grid",
63
+ "treeview-grid",
64
+ "hierarchical-grid",
65
+ "nested-table",
66
+ "parent-child-table",
67
+ "collapsible-table",
68
+ "multi-level-table"
59
69
  ],
60
70
  "license": "SEE LICENSE IN license",
61
71
  "main": "./dist/ej2-treegrid.umd.min.js",
@@ -66,6 +76,6 @@
66
76
  "url": "git+https://github.com/syncfusion/ej2-treegrid.git"
67
77
  },
68
78
  "typings": "index.d.ts",
69
- "version": "26.1.40",
79
+ "version": "26.1.42",
70
80
  "sideEffects": false
71
81
  }
@@ -239,7 +239,7 @@ export function removeChildRecords(childRecords, modifiedData, action, key, cont
239
239
  editedData.taskData[keys[parseInt(i.toString(), 10)]] =
240
240
  childRecords[parseInt(j.toString(), 10)][keys[parseInt(i.toString(), 10)]] =
241
241
  modifiedData[keys[parseInt(i.toString(), 10)]];
242
- if (control.grid.editSettings.mode === 'Normal' && control.editSettings.mode === 'Cell') {
242
+ if (control.grid.editSettings.mode === 'Normal' && control.editSettings.mode === 'Cell' && !isNullOrUndefined(control.grid.editModule)) {
243
243
  var editModule = 'editModule';
244
244
  control.grid.editModule["" + editModule].editRowIndex = modifiedData.index;
245
245
  control.grid.editModule["" + editModule].updateCurrentViewData(modifiedData);
@@ -956,7 +956,7 @@ var RowDD = /** @class */ (function () {
956
956
  var _loop_1 = function (i) {
957
957
  draggedRecord_2 = dragRecords[parseInt(i.toString(), 10)];
958
958
  this_1.draggedRecord = draggedRecord_2;
959
- if (this_1.dropPosition !== 'Invalid') {
959
+ if (this_1.dropPosition !== 'Invalid' && !isNullOrUndefined(this_1.droppedRecord)) {
960
960
  if (!tObj.rowDropSettings.targetID || isByMethod) {
961
961
  this_1.deleteDragRow();
962
962
  }
@@ -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 {