@syncfusion/ej2-treegrid 28.2.3 → 28.2.6

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.
@@ -2238,7 +2238,7 @@ class DataManipulation {
2238
2238
  qry.expand(expandDetail);
2239
2239
  }
2240
2240
  qry.where(this.parent.parentIdMapping, 'equal', rowDetails.record[this.parent.idMapping]);
2241
- if (rowDetails.action === 'remoteExpand' && this.parent.grid.filterModule && this.parent.grid.filterModule['value']) {
2241
+ if (rowDetails.action === 'remoteExpand' && this.parent.grid.filterSettings && this.parent.grid.filterSettings.columns.length) {
2242
2242
  const filterqry = this.parent.grid.getDataModule().generateQuery().queries.filter((e) => e.fn !== 'onPage' && typeof e.e.predicates !== 'undefined');
2243
2243
  qry.queries.push(filterqry[0]);
2244
2244
  }
@@ -13433,8 +13433,16 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
13433
13433
  if (isNullOrUndefined(this.observer[`${containerRect}`])) {
13434
13434
  this.observer[`${containerRect}`] = this.observers[`${containerRect}`];
13435
13435
  }
13436
- if (isNullOrUndefined(this.parent.clipboardModule['treeGridParent'].editModule) || args.selectedIndex !== 0 ||
13437
- isNullOrUndefined(this.parent.clipboardModule['treeGridParent'].editModule['addRowIndex'])) {
13436
+ const treeGridParent = this.parent.clipboardModule['treeGridParent'];
13437
+ if (isNullOrUndefined(treeGridParent.editModule) ||
13438
+ isNullOrUndefined(treeGridParent.editModule['addRowIndex']) || args.selectedIndex !== 0) {
13439
+ if (!isNullOrUndefined(treeGridParent.grid.sortModule) && treeGridParent.grid.sortModule['sortedColumns'].length > 0) {
13440
+ const sortedData = treeGridParent.dataModule['sortedData'];
13441
+ if (!isNullOrUndefined(sortedData) && sortedData.length > 0) {
13442
+ const targetIndex = sortedData.findIndex((record) => record.index === args.selectedIndex);
13443
+ args.selectedIndex = targetIndex;
13444
+ }
13445
+ }
13438
13446
  super[`${selectVirtualRow}`](args);
13439
13447
  }
13440
13448
  }