@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.
@@ -2407,7 +2407,7 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
2407
2407
  qry.expand(expandDetail);
2408
2408
  }
2409
2409
  qry.where(this.parent.parentIdMapping, 'equal', rowDetails.record[this.parent.idMapping]);
2410
- if (rowDetails.action === 'remoteExpand' && this.parent.grid.filterModule && this.parent.grid.filterModule['value']) {
2410
+ if (rowDetails.action === 'remoteExpand' && this.parent.grid.filterSettings && this.parent.grid.filterSettings.columns.length) {
2411
2411
  var filterqry = this.parent.grid.getDataModule().generateQuery().queries.filter(function (e) { return e.fn !== 'onPage' && typeof e.e.predicates !== 'undefined'; });
2412
2412
  qry.queries.push(filterqry[0]);
2413
2413
  }
@@ -13868,8 +13868,16 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13868
13868
  if (isNullOrUndefined(this.observer["" + containerRect])) {
13869
13869
  this.observer["" + containerRect] = this.observers["" + containerRect];
13870
13870
  }
13871
- if (isNullOrUndefined(this.parent.clipboardModule['treeGridParent'].editModule) || args.selectedIndex !== 0 ||
13872
- isNullOrUndefined(this.parent.clipboardModule['treeGridParent'].editModule['addRowIndex'])) {
13871
+ var treeGridParent = this.parent.clipboardModule['treeGridParent'];
13872
+ if (isNullOrUndefined(treeGridParent.editModule) ||
13873
+ isNullOrUndefined(treeGridParent.editModule['addRowIndex']) || args.selectedIndex !== 0) {
13874
+ if (!isNullOrUndefined(treeGridParent.grid.sortModule) && treeGridParent.grid.sortModule['sortedColumns'].length > 0) {
13875
+ var sortedData = treeGridParent.dataModule['sortedData'];
13876
+ if (!isNullOrUndefined(sortedData) && sortedData.length > 0) {
13877
+ var targetIndex = sortedData.findIndex(function (record) { return record.index === args.selectedIndex; });
13878
+ args.selectedIndex = targetIndex;
13879
+ }
13880
+ }
13873
13881
  _super.prototype["" + selectVirtualRow].call(this, args);
13874
13882
  }
13875
13883
  };