@syncfusion/ej2-treegrid 33.1.44 → 33.1.46

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 : 33.1.44
3
+ * version : 33.1.46
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": "33.1.44",
3
+ "version": "33.1.46",
4
4
  "description": "Essential JS 2 TreeGrid Component",
5
5
  "author": "Syncfusion Inc.",
6
6
  "license": "SEE LICENSE IN license",
@@ -8,9 +8,9 @@
8
8
  "module": "./index.js",
9
9
  "es2015": "./dist/es6/ej2-treegrid.es5.js",
10
10
  "dependencies": {
11
- "@syncfusion/ej2-base": "~33.1.44",
12
- "@syncfusion/ej2-data": "~33.1.44",
13
- "@syncfusion/ej2-grids": "~33.1.44",
11
+ "@syncfusion/ej2-base": "~33.1.45",
12
+ "@syncfusion/ej2-data": "~33.1.45",
13
+ "@syncfusion/ej2-grids": "~33.1.46",
14
14
  "@syncfusion/ej2-popups": "~33.1.44"
15
15
  },
16
16
  "devDependencies": {},
@@ -202,7 +202,7 @@ var BatchEdit = /** @class */ (function () {
202
202
  added.childRecords = [];
203
203
  this.batchRecords.splice(added.index, 0, added);
204
204
  this.currentViewRecords.splice(added.index, 0, added);
205
- if (currentDataIndex) {
205
+ if (currentDataIndex > -1) {
206
206
  indexvalue = currentDataIndex;
207
207
  }
208
208
  else {
@@ -170,6 +170,9 @@ var Edit = /** @class */ (function () {
170
170
  }
171
171
  }
172
172
  }
173
+ if (eventName === 'actionComplete' && eventArgs.requestType === 'save') {
174
+ this.addRowRecord = null;
175
+ }
173
176
  if (this.parent.enableInfiniteScrolling && eventName === 'actionComplete') {
174
177
  this.infiniteAddAction(eventArgs);
175
178
  }
@@ -1,5 +1,6 @@
1
1
  import { getObject, Filter as GridFilter, Grid } from '@syncfusion/ej2-grids';
2
2
  import { isNullOrUndefined, setValue, getValue } from '@syncfusion/ej2-base';
3
+ import { getExpandStatus } from '../utils';
3
4
  import { getParentData } from '../utils';
4
5
  /**
5
6
  * TreeGrid Filter module will handle filtering action
@@ -97,6 +98,25 @@ var Filter = /** @class */ (function () {
97
98
  if (this.flatFilteredData.length > 0 && this.isHierarchyFilter) {
98
99
  this.updateFilterLevel();
99
100
  }
101
+ var _loop_1 = function (i) {
102
+ var record = this_1.filteredResult[parseInt(i.toString(), 10)];
103
+ if (!isNullOrUndefined(record.parentItem)) {
104
+ var parentUID_1 = record.parentItem.uniqueID;
105
+ var parentPresent = this_1.filteredResult.some(function (r) {
106
+ return !isNullOrUndefined(r.uniqueID) && r.uniqueID === parentUID_1;
107
+ });
108
+ if (parentPresent) {
109
+ record.isCollapsedChild = !getExpandStatus(this_1.parent, record, this_1.parent.parentData);
110
+ }
111
+ else {
112
+ record.isCollapsedChild = false;
113
+ }
114
+ }
115
+ };
116
+ var this_1 = this;
117
+ for (var i = 0; i < this.filteredResult.length; i++) {
118
+ _loop_1(i);
119
+ }
100
120
  this.parent.notify('updateAction', { result: this.filteredResult });
101
121
  };
102
122
  Filter.prototype.updateParentFilteredRecord = function (record) {
@@ -497,8 +497,10 @@ var RowDD = /** @class */ (function () {
497
497
  var record = this.getChildrecordsByParentID(droppedRecord.parentUniqueID)[0];
498
498
  var childRecords = record.childRecords;
499
499
  for (var i = 0; i < childRecords.length; i++) {
500
- droppedRecord.parentItem.taskData[this.parent.childMapping][parseInt(i.toString(), 10)]
501
- = childRecords[parseInt(i.toString(), 10)].taskData;
500
+ if (!isNullOrUndefined(childRecords[parseInt(i.toString(), 10)].taskData)) {
501
+ droppedRecord.parentItem.taskData[this.parent.childMapping][parseInt(i.toString(), 10)]
502
+ = childRecords[parseInt(i.toString(), 10)].taskData;
503
+ }
502
504
  }
503
505
  }
504
506
  }
@@ -1084,6 +1086,11 @@ var RowDD = /** @class */ (function () {
1084
1086
  * @returns {void} This function does not return a value.
1085
1087
  */
1086
1088
  RowDD.prototype.rowDropped = function (args) {
1089
+ if (!isNullOrUndefined(this.parent.aggregates[0]) && this.parent.aggregates[0].showChildSummary) {
1090
+ var records = this.parent.grid.getCurrentViewRecords();
1091
+ args.fromIndex = records[args.fromIndex].index;
1092
+ args.dropIndex = records[args.dropIndex].index;
1093
+ }
1087
1094
  var tObj = this.parent;
1088
1095
  var parentItem = 'parentItem';
1089
1096
  if (!tObj.rowDropSettings.targetID) {
@@ -130,7 +130,8 @@ var VirtualScroll = /** @class */ (function () {
130
130
  var dm = new DataManager(pageingDetails.result);
131
131
  var expanded = new Predicate('expanded', 'notequal', null).or('expanded', 'notequal', undefined);
132
132
  var parents = dm.executeLocal(new Query().where(expanded));
133
- var isFiltering = pageingDetails.actionArgs.requestType === 'filtering';
133
+ var isFiltering = (pageingDetails.actionArgs.requestType === 'filtering' && (pageingDetails.actionArgs.action !== 'clear-filter' && pageingDetails.actionArgs.action !== 'clearFilter')) ||
134
+ (!isNullOrUndefined(this.parent['filterModule']) && (this.parent['filterModule'].filteredResult && this.parent['filterModule'].filteredResult.length > 0));
134
135
  var isFlatHierarchy = this.parent.filterSettings.hierarchyMode === 'Child' ||
135
136
  this.parent.filterSettings.hierarchyMode === 'None';
136
137
  var visualData = isFiltering && isFlatHierarchy
@@ -2938,7 +2938,7 @@ var TreeGrid = /** @class */ (function (_super) {
2938
2938
  var temp;
2939
2939
  var field;
2940
2940
  var gridColumns = isNullOrUndefined(column) ? this.grid.getColumns() : column;
2941
- if (this.treeColumnIndex !== -1 && this.columnModel[this.treeColumnIndex] &&
2941
+ if (this.treeColumnIndex !== -1 && !isNullOrUndefined(this.columnModel) && this.columnModel[this.treeColumnIndex] &&
2942
2942
  !isNullOrUndefined(this.columnModel[this.treeColumnIndex].template)) {
2943
2943
  temp = this.columnModel[this.treeColumnIndex].template;
2944
2944
  field = this.columnModel[this.treeColumnIndex].field;
@@ -4377,7 +4377,10 @@ var TreeGrid = /** @class */ (function (_super) {
4377
4377
  };
4378
4378
  TreeGrid.prototype.partialFilterUpdate = function (args) {
4379
4379
  var gridFiltered = args.gridFiltered;
4380
- this.notify('updateFilterRecs', { data: gridFiltered });
4380
+ if ((this.allowFiltering && this.filterModule && this.grid.filterSettings.columns.length) ||
4381
+ (this.grid.searchSettings.key.length > 0)) {
4382
+ this.notify('updateFilterRecs', { data: gridFiltered });
4383
+ }
4381
4384
  };
4382
4385
  /**
4383
4386
  * Filters the TreeGrid rows based on a specified column and filter criteria.
@@ -32,6 +32,16 @@ var Render = /** @class */ (function () {
32
32
  }
33
33
  var data = args.data;
34
34
  var parentData = data.parentItem;
35
+ if (!isNullOrUndefined(parentData) && data.isCollapsedChild && !isNullOrUndefined(args.row)) {
36
+ this.parent['toggleRowVisibility'](args.row, 'e-childrow-hidden');
37
+ var rowsObj = this.parent.grid.getRowsObject();
38
+ if (!this.parent.grid.isFrozenGrid() && !isNullOrUndefined(args.row.getAttribute('data-uid'))) {
39
+ var row = rowsObj.filter(function (e) { return e.uid === args.row.getAttribute('data-uid'); })[0];
40
+ if (row) {
41
+ row.visible = false;
42
+ }
43
+ }
44
+ }
35
45
  if (!isNullOrUndefined(data.parentItem) && !isFilterChildHierarchy(this.parent) &&
36
46
  (!(this.parent.allowPaging && !(this.parent.pageSettings.pageSizeMode === 'Root')) ||
37
47
  (isRemoteData(this.parent) && !isOffline(this.parent)))) {
@@ -60,6 +70,11 @@ var Render = /** @class */ (function () {
60
70
  var summaryRow = getObject('isSummaryRow', args.data);
61
71
  if (summaryRow) {
62
72
  addClass([args.row], 'e-summaryrow');
73
+ var isDragandDropCell = args.row.querySelector('.e-rowdragdrop') || args.row.querySelector('.e-rowdragdrop.e-dragging');
74
+ if (isDragandDropCell) {
75
+ args.row.cells[0].className = 'e-rowcell e-summarycell';
76
+ args.row.cells[0].innerHTML = '';
77
+ }
63
78
  }
64
79
  if (!isNullOrUndefined(args.row)) {
65
80
  if (args.row.querySelector('.e-treegridexpand')) {