@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.
@@ -2180,6 +2180,16 @@ var Render = /** @__PURE__ @class */ (function () {
2180
2180
  }
2181
2181
  var data = args.data;
2182
2182
  var parentData = data.parentItem;
2183
+ if (!isNullOrUndefined(parentData) && data.isCollapsedChild && !isNullOrUndefined(args.row)) {
2184
+ this.parent['toggleRowVisibility'](args.row, 'e-childrow-hidden');
2185
+ var rowsObj = this.parent.grid.getRowsObject();
2186
+ if (!this.parent.grid.isFrozenGrid() && !isNullOrUndefined(args.row.getAttribute('data-uid'))) {
2187
+ var row = rowsObj.filter(function (e) { return e.uid === args.row.getAttribute('data-uid'); })[0];
2188
+ if (row) {
2189
+ row.visible = false;
2190
+ }
2191
+ }
2192
+ }
2183
2193
  if (!isNullOrUndefined(data.parentItem) && !isFilterChildHierarchy(this.parent) &&
2184
2194
  (!(this.parent.allowPaging && !(this.parent.pageSettings.pageSizeMode === 'Root')) ||
2185
2195
  (isRemoteData(this.parent) && !isOffline(this.parent)))) {
@@ -2208,6 +2218,11 @@ var Render = /** @__PURE__ @class */ (function () {
2208
2218
  var summaryRow = getObject('isSummaryRow', args.data);
2209
2219
  if (summaryRow) {
2210
2220
  addClass([args.row], 'e-summaryrow');
2221
+ var isDragandDropCell = args.row.querySelector('.e-rowdragdrop') || args.row.querySelector('.e-rowdragdrop.e-dragging');
2222
+ if (isDragandDropCell) {
2223
+ args.row.cells[0].className = 'e-rowcell e-summarycell';
2224
+ args.row.cells[0].innerHTML = '';
2225
+ }
2211
2226
  }
2212
2227
  if (!isNullOrUndefined(args.row)) {
2213
2228
  if (args.row.querySelector('.e-treegridexpand')) {
@@ -7175,7 +7190,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
7175
7190
  var temp;
7176
7191
  var field;
7177
7192
  var gridColumns = isNullOrUndefined(column) ? this.grid.getColumns() : column;
7178
- if (this.treeColumnIndex !== -1 && this.columnModel[this.treeColumnIndex] &&
7193
+ if (this.treeColumnIndex !== -1 && !isNullOrUndefined(this.columnModel) && this.columnModel[this.treeColumnIndex] &&
7179
7194
  !isNullOrUndefined(this.columnModel[this.treeColumnIndex].template)) {
7180
7195
  temp = this.columnModel[this.treeColumnIndex].template;
7181
7196
  field = this.columnModel[this.treeColumnIndex].field;
@@ -8614,7 +8629,10 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
8614
8629
  };
8615
8630
  TreeGrid.prototype.partialFilterUpdate = function (args) {
8616
8631
  var gridFiltered = args.gridFiltered;
8617
- this.notify('updateFilterRecs', { data: gridFiltered });
8632
+ if ((this.allowFiltering && this.filterModule && this.grid.filterSettings.columns.length) ||
8633
+ (this.grid.searchSettings.key.length > 0)) {
8634
+ this.notify('updateFilterRecs', { data: gridFiltered });
8635
+ }
8618
8636
  };
8619
8637
  /**
8620
8638
  * Filters the TreeGrid rows based on a specified column and filter criteria.
@@ -10099,8 +10117,10 @@ var RowDD = /** @__PURE__ @class */ (function () {
10099
10117
  var record = this.getChildrecordsByParentID(droppedRecord.parentUniqueID)[0];
10100
10118
  var childRecords = record.childRecords;
10101
10119
  for (var i = 0; i < childRecords.length; i++) {
10102
- droppedRecord.parentItem.taskData[this.parent.childMapping][parseInt(i.toString(), 10)]
10103
- = childRecords[parseInt(i.toString(), 10)].taskData;
10120
+ if (!isNullOrUndefined(childRecords[parseInt(i.toString(), 10)].taskData)) {
10121
+ droppedRecord.parentItem.taskData[this.parent.childMapping][parseInt(i.toString(), 10)]
10122
+ = childRecords[parseInt(i.toString(), 10)].taskData;
10123
+ }
10104
10124
  }
10105
10125
  }
10106
10126
  }
@@ -10686,6 +10706,11 @@ var RowDD = /** @__PURE__ @class */ (function () {
10686
10706
  * @returns {void} This function does not return a value.
10687
10707
  */
10688
10708
  RowDD.prototype.rowDropped = function (args) {
10709
+ if (!isNullOrUndefined(this.parent.aggregates[0]) && this.parent.aggregates[0].showChildSummary) {
10710
+ var records = this.parent.grid.getCurrentViewRecords();
10711
+ args.fromIndex = records[args.fromIndex].index;
10712
+ args.dropIndex = records[args.dropIndex].index;
10713
+ }
10689
10714
  var tObj = this.parent;
10690
10715
  var parentItem = 'parentItem';
10691
10716
  if (!tObj.rowDropSettings.targetID) {
@@ -11735,6 +11760,25 @@ var Filter = /** @__PURE__ @class */ (function () {
11735
11760
  if (this.flatFilteredData.length > 0 && this.isHierarchyFilter) {
11736
11761
  this.updateFilterLevel();
11737
11762
  }
11763
+ var _loop_1 = function (i) {
11764
+ var record = this_1.filteredResult[parseInt(i.toString(), 10)];
11765
+ if (!isNullOrUndefined(record.parentItem)) {
11766
+ var parentUID_1 = record.parentItem.uniqueID;
11767
+ var parentPresent = this_1.filteredResult.some(function (r) {
11768
+ return !isNullOrUndefined(r.uniqueID) && r.uniqueID === parentUID_1;
11769
+ });
11770
+ if (parentPresent) {
11771
+ record.isCollapsedChild = !getExpandStatus(this_1.parent, record, this_1.parent.parentData);
11772
+ }
11773
+ else {
11774
+ record.isCollapsedChild = false;
11775
+ }
11776
+ }
11777
+ };
11778
+ var this_1 = this;
11779
+ for (var i = 0; i < this.filteredResult.length; i++) {
11780
+ _loop_1(i);
11781
+ }
11738
11782
  this.parent.notify('updateAction', { result: this.filteredResult });
11739
11783
  };
11740
11784
  Filter.prototype.updateParentFilteredRecord = function (record) {
@@ -13455,7 +13499,7 @@ var BatchEdit = /** @__PURE__ @class */ (function () {
13455
13499
  added.childRecords = [];
13456
13500
  this.batchRecords.splice(added.index, 0, added);
13457
13501
  this.currentViewRecords.splice(added.index, 0, added);
13458
- if (currentDataIndex) {
13502
+ if (currentDataIndex > -1) {
13459
13503
  indexvalue = currentDataIndex;
13460
13504
  }
13461
13505
  else {
@@ -14093,6 +14137,9 @@ var Edit = /** @__PURE__ @class */ (function () {
14093
14137
  }
14094
14138
  }
14095
14139
  }
14140
+ if (eventName === 'actionComplete' && eventArgs.requestType === 'save') {
14141
+ this.addRowRecord = null;
14142
+ }
14096
14143
  if (this.parent.enableInfiniteScrolling && eventName === 'actionComplete') {
14097
14144
  this.infiniteAddAction(eventArgs);
14098
14145
  }
@@ -16512,7 +16559,8 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
16512
16559
  var dm = new DataManager(pageingDetails.result);
16513
16560
  var expanded = new Predicate$1('expanded', 'notequal', null).or('expanded', 'notequal', undefined);
16514
16561
  var parents = dm.executeLocal(new Query().where(expanded));
16515
- var isFiltering = pageingDetails.actionArgs.requestType === 'filtering';
16562
+ var isFiltering = (pageingDetails.actionArgs.requestType === 'filtering' && (pageingDetails.actionArgs.action !== 'clear-filter' && pageingDetails.actionArgs.action !== 'clearFilter')) ||
16563
+ (!isNullOrUndefined(this.parent['filterModule']) && (this.parent['filterModule'].filteredResult && this.parent['filterModule'].filteredResult.length > 0));
16516
16564
  var isFlatHierarchy = this.parent.filterSettings.hierarchyMode === 'Child' ||
16517
16565
  this.parent.filterSettings.hierarchyMode === 'None';
16518
16566
  var visualData = isFiltering && isFlatHierarchy