@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.
@@ -2019,6 +2019,16 @@ class Render {
2019
2019
  }
2020
2020
  const data = args.data;
2021
2021
  const parentData = data.parentItem;
2022
+ if (!isNullOrUndefined(parentData) && data.isCollapsedChild && !isNullOrUndefined(args.row)) {
2023
+ this.parent['toggleRowVisibility'](args.row, 'e-childrow-hidden');
2024
+ const rowsObj = this.parent.grid.getRowsObject();
2025
+ if (!this.parent.grid.isFrozenGrid() && !isNullOrUndefined(args.row.getAttribute('data-uid'))) {
2026
+ const row = rowsObj.filter((e) => e.uid === args.row.getAttribute('data-uid'))[0];
2027
+ if (row) {
2028
+ row.visible = false;
2029
+ }
2030
+ }
2031
+ }
2022
2032
  if (!isNullOrUndefined(data.parentItem) && !isFilterChildHierarchy(this.parent) &&
2023
2033
  (!(this.parent.allowPaging && !(this.parent.pageSettings.pageSizeMode === 'Root')) ||
2024
2034
  (isRemoteData(this.parent) && !isOffline(this.parent)))) {
@@ -2047,6 +2057,11 @@ class Render {
2047
2057
  const summaryRow = getObject('isSummaryRow', args.data);
2048
2058
  if (summaryRow) {
2049
2059
  addClass([args.row], 'e-summaryrow');
2060
+ const isDragandDropCell = args.row.querySelector('.e-rowdragdrop') || args.row.querySelector('.e-rowdragdrop.e-dragging');
2061
+ if (isDragandDropCell) {
2062
+ args.row.cells[0].className = 'e-rowcell e-summarycell';
2063
+ args.row.cells[0].innerHTML = '';
2064
+ }
2050
2065
  }
2051
2066
  if (!isNullOrUndefined(args.row)) {
2052
2067
  if (args.row.querySelector('.e-treegridexpand')) {
@@ -9725,8 +9740,10 @@ class RowDD {
9725
9740
  const record = this.getChildrecordsByParentID(droppedRecord.parentUniqueID)[0];
9726
9741
  const childRecords = record.childRecords;
9727
9742
  for (let i = 0; i < childRecords.length; i++) {
9728
- droppedRecord.parentItem.taskData[this.parent.childMapping][parseInt(i.toString(), 10)]
9729
- = childRecords[parseInt(i.toString(), 10)].taskData;
9743
+ if (!isNullOrUndefined(childRecords[parseInt(i.toString(), 10)].taskData)) {
9744
+ droppedRecord.parentItem.taskData[this.parent.childMapping][parseInt(i.toString(), 10)]
9745
+ = childRecords[parseInt(i.toString(), 10)].taskData;
9746
+ }
9730
9747
  }
9731
9748
  }
9732
9749
  }
@@ -10310,6 +10327,11 @@ class RowDD {
10310
10327
  * @returns {void} This function does not return a value.
10311
10328
  */
10312
10329
  rowDropped(args) {
10330
+ if (!isNullOrUndefined(this.parent.aggregates[0]) && this.parent.aggregates[0].showChildSummary) {
10331
+ const records = this.parent.grid.getCurrentViewRecords();
10332
+ args.fromIndex = records[args.fromIndex].index;
10333
+ args.dropIndex = records[args.dropIndex].index;
10334
+ }
10313
10335
  const tObj = this.parent;
10314
10336
  const parentItem = 'parentItem';
10315
10337
  if (!tObj.rowDropSettings.targetID) {
@@ -11315,6 +11337,21 @@ class Filter {
11315
11337
  if (this.flatFilteredData.length > 0 && this.isHierarchyFilter) {
11316
11338
  this.updateFilterLevel();
11317
11339
  }
11340
+ for (let i = 0; i < this.filteredResult.length; i++) {
11341
+ const record = this.filteredResult[parseInt(i.toString(), 10)];
11342
+ if (!isNullOrUndefined(record.parentItem)) {
11343
+ const parentUID = record.parentItem.uniqueID;
11344
+ const parentPresent = this.filteredResult.some((r) => {
11345
+ return !isNullOrUndefined(r.uniqueID) && r.uniqueID === parentUID;
11346
+ });
11347
+ if (parentPresent) {
11348
+ record.isCollapsedChild = !getExpandStatus(this.parent, record, this.parent.parentData);
11349
+ }
11350
+ else {
11351
+ record.isCollapsedChild = false;
11352
+ }
11353
+ }
11354
+ }
11318
11355
  this.parent.notify('updateAction', { result: this.filteredResult });
11319
11356
  }
11320
11357
  updateParentFilteredRecord(record) {
@@ -13006,7 +13043,7 @@ class BatchEdit {
13006
13043
  added.childRecords = [];
13007
13044
  this.batchRecords.splice(added.index, 0, added);
13008
13045
  this.currentViewRecords.splice(added.index, 0, added);
13009
- if (currentDataIndex) {
13046
+ if (currentDataIndex > -1) {
13010
13047
  indexvalue = currentDataIndex;
13011
13048
  }
13012
13049
  else {
@@ -13632,6 +13669,9 @@ class Edit {
13632
13669
  }
13633
13670
  }
13634
13671
  }
13672
+ if (eventName === 'actionComplete' && eventArgs.requestType === 'save') {
13673
+ this.addRowRecord = null;
13674
+ }
13635
13675
  if (this.parent.enableInfiniteScrolling && eventName === 'actionComplete') {
13636
13676
  this.infiniteAddAction(eventArgs);
13637
13677
  }
@@ -15998,7 +16038,8 @@ class VirtualScroll {
15998
16038
  const dm = new DataManager(pageingDetails.result);
15999
16039
  const expanded = new Predicate$1('expanded', 'notequal', null).or('expanded', 'notequal', undefined);
16000
16040
  const parents = dm.executeLocal(new Query().where(expanded));
16001
- const isFiltering = pageingDetails.actionArgs.requestType === 'filtering';
16041
+ const isFiltering = (pageingDetails.actionArgs.requestType === 'filtering' && pageingDetails.actionArgs.action !== 'clear-filter') ||
16042
+ (!isNullOrUndefined(this.parent['filterModule']) && (this.parent['filterModule'].filteredResult && this.parent['filterModule'].filteredResult.length > 0));
16002
16043
  const isFlatHierarchy = this.parent.filterSettings.hierarchyMode === 'Child' ||
16003
16044
  this.parent.filterSettings.hierarchyMode === 'None';
16004
16045
  const visualData = isFiltering && isFlatHierarchy