@syncfusion/ej2-treegrid 33.1.44 → 33.1.45

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')) {
@@ -10099,8 +10114,10 @@ var RowDD = /** @__PURE__ @class */ (function () {
10099
10114
  var record = this.getChildrecordsByParentID(droppedRecord.parentUniqueID)[0];
10100
10115
  var childRecords = record.childRecords;
10101
10116
  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;
10117
+ if (!isNullOrUndefined(childRecords[parseInt(i.toString(), 10)].taskData)) {
10118
+ droppedRecord.parentItem.taskData[this.parent.childMapping][parseInt(i.toString(), 10)]
10119
+ = childRecords[parseInt(i.toString(), 10)].taskData;
10120
+ }
10104
10121
  }
10105
10122
  }
10106
10123
  }
@@ -10686,6 +10703,11 @@ var RowDD = /** @__PURE__ @class */ (function () {
10686
10703
  * @returns {void} This function does not return a value.
10687
10704
  */
10688
10705
  RowDD.prototype.rowDropped = function (args) {
10706
+ if (!isNullOrUndefined(this.parent.aggregates[0]) && this.parent.aggregates[0].showChildSummary) {
10707
+ var records = this.parent.grid.getCurrentViewRecords();
10708
+ args.fromIndex = records[args.fromIndex].index;
10709
+ args.dropIndex = records[args.dropIndex].index;
10710
+ }
10689
10711
  var tObj = this.parent;
10690
10712
  var parentItem = 'parentItem';
10691
10713
  if (!tObj.rowDropSettings.targetID) {
@@ -11735,6 +11757,25 @@ var Filter = /** @__PURE__ @class */ (function () {
11735
11757
  if (this.flatFilteredData.length > 0 && this.isHierarchyFilter) {
11736
11758
  this.updateFilterLevel();
11737
11759
  }
11760
+ var _loop_1 = function (i) {
11761
+ var record = this_1.filteredResult[parseInt(i.toString(), 10)];
11762
+ if (!isNullOrUndefined(record.parentItem)) {
11763
+ var parentUID_1 = record.parentItem.uniqueID;
11764
+ var parentPresent = this_1.filteredResult.some(function (r) {
11765
+ return !isNullOrUndefined(r.uniqueID) && r.uniqueID === parentUID_1;
11766
+ });
11767
+ if (parentPresent) {
11768
+ record.isCollapsedChild = !getExpandStatus(this_1.parent, record, this_1.parent.parentData);
11769
+ }
11770
+ else {
11771
+ record.isCollapsedChild = false;
11772
+ }
11773
+ }
11774
+ };
11775
+ var this_1 = this;
11776
+ for (var i = 0; i < this.filteredResult.length; i++) {
11777
+ _loop_1(i);
11778
+ }
11738
11779
  this.parent.notify('updateAction', { result: this.filteredResult });
11739
11780
  };
11740
11781
  Filter.prototype.updateParentFilteredRecord = function (record) {
@@ -13455,7 +13496,7 @@ var BatchEdit = /** @__PURE__ @class */ (function () {
13455
13496
  added.childRecords = [];
13456
13497
  this.batchRecords.splice(added.index, 0, added);
13457
13498
  this.currentViewRecords.splice(added.index, 0, added);
13458
- if (currentDataIndex) {
13499
+ if (currentDataIndex > -1) {
13459
13500
  indexvalue = currentDataIndex;
13460
13501
  }
13461
13502
  else {
@@ -14093,6 +14134,9 @@ var Edit = /** @__PURE__ @class */ (function () {
14093
14134
  }
14094
14135
  }
14095
14136
  }
14137
+ if (eventName === 'actionComplete' && eventArgs.requestType === 'save') {
14138
+ this.addRowRecord = null;
14139
+ }
14096
14140
  if (this.parent.enableInfiniteScrolling && eventName === 'actionComplete') {
14097
14141
  this.infiniteAddAction(eventArgs);
14098
14142
  }
@@ -16512,7 +16556,8 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
16512
16556
  var dm = new DataManager(pageingDetails.result);
16513
16557
  var expanded = new Predicate$1('expanded', 'notequal', null).or('expanded', 'notequal', undefined);
16514
16558
  var parents = dm.executeLocal(new Query().where(expanded));
16515
- var isFiltering = pageingDetails.actionArgs.requestType === 'filtering';
16559
+ var isFiltering = (pageingDetails.actionArgs.requestType === 'filtering' && pageingDetails.actionArgs.action !== 'clear-filter') ||
16560
+ (!isNullOrUndefined(this.parent['filterModule']) && (this.parent['filterModule'].filteredResult && this.parent['filterModule'].filteredResult.length > 0));
16516
16561
  var isFlatHierarchy = this.parent.filterSettings.hierarchyMode === 'Child' ||
16517
16562
  this.parent.filterSettings.hierarchyMode === 'None';
16518
16563
  var visualData = isFiltering && isFlatHierarchy