@syncfusion/ej2-treegrid 21.2.4 → 21.2.5

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.
@@ -2290,6 +2290,10 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
2290
2290
  qry.expand(expandDetail);
2291
2291
  }
2292
2292
  qry.where(this.parent.parentIdMapping, 'equal', rowDetails.record[this.parent.idMapping]);
2293
+ if (rowDetails.action === 'remoteExpand' && this.parent.grid.filterModule && this.parent.grid.filterModule['value']) {
2294
+ var filterqry = this.parent.grid.getDataModule().generateQuery().queries.filter(function (e) { return e.fn !== 'onPage' && typeof e.e.predicates !== 'undefined'; });
2295
+ qry.queries.push(filterqry[0]);
2296
+ }
2293
2297
  showSpinner(this.parent.element);
2294
2298
  dm.executeQuery(qry).then(function (e) {
2295
2299
  var remoteExpandedData = 'remoteExpandedData';
@@ -2312,6 +2316,24 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
2312
2316
  }
2313
2317
  var haveChild = getObject('actual.nextLevel', e);
2314
2318
  var result = e.result;
2319
+ var resultChildData = [];
2320
+ if (rowDetails.action === 'remoteExpand' && _this.parent.grid.filterModule && _this.parent.grid.filterModule['value']) {
2321
+ for (var i = 0; i < datas.length; i++) {
2322
+ if (Object.prototype.hasOwnProperty.call(datas[parseInt(i.toString(), 10)], _this.parent.parentIdMapping) && datas[parseInt(i.toString(), 10)]['' + _this.parent.parentIdMapping] !== null && datas[parseInt(i.toString(), 10)].level === 0) {
2323
+ datas.splice(i, 1);
2324
+ i--;
2325
+ }
2326
+ }
2327
+ for (var i = 0; i < result.length; i++) {
2328
+ if (rowDetails.record['' + _this.parent.idMapping] !== result[parseInt(i.toString(), 10)]['' + _this.parent.idMapping] &&
2329
+ rowDetails.record['' + _this.parent.idMapping] === result[parseInt(i.toString(), 10)]['' + _this.parent.parentIdMapping]) {
2330
+ if (Object.prototype.hasOwnProperty.call(result, i)) {
2331
+ resultChildData.push(result[parseInt(i.toString(), 10)]);
2332
+ }
2333
+ }
2334
+ }
2335
+ result = resultChildData;
2336
+ }
2315
2337
  rowDetails.record.childRecords = result;
2316
2338
  for (var r = 0; r < result.length; r++) {
2317
2339
  if (_this.parent.enableVirtualization && result[parseInt(r.toString(), 10)]["" + _this.parent.idMapping] === rowDetails.record["" + _this.parent.idMapping] && rowDetails.action === 'remoteExpand') {
@@ -3807,7 +3829,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
3807
3829
  target = e.target;
3808
3830
  parentTarget = target.parentElement;
3809
3831
  var cellIndex = parentTarget.cellIndex;
3810
- if (this.grid.getColumnByIndex(cellIndex).editType === 'dropdownedit' && isNullOrUndefined(this.grid.getColumnByIndex(cellIndex).edit["obj"])) {
3832
+ if (this.grid.getColumnByIndex(cellIndex).editType === 'dropdownedit' && isNullOrUndefined(this.grid.getColumnByIndex(cellIndex).edit['obj'])) {
3811
3833
  parentTarget = target;
3812
3834
  }
3813
3835
  summaryElement = this.findnextRowElement(parentTarget);
@@ -3829,7 +3851,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
3829
3851
  target = e.target;
3830
3852
  parentTarget = target.parentElement;
3831
3853
  var cellIndex = parentTarget.cellIndex;
3832
- if (this.grid.getColumnByIndex(cellIndex).editType === 'dropdownedit' && isNullOrUndefined(this.grid.getColumnByIndex(cellIndex).edit["obj"])) {
3854
+ if (this.grid.getColumnByIndex(cellIndex).editType === 'dropdownedit' && isNullOrUndefined(this.grid.getColumnByIndex(cellIndex).edit['obj'])) {
3833
3855
  parentTarget = target;
3834
3856
  }
3835
3857
  summaryElement = this.findPreviousRowElement(parentTarget);
@@ -4581,7 +4603,10 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4581
4603
  var currentData = _this.getCurrentViewRecords();
4582
4604
  var rows = _this.getContentTable().rows;
4583
4605
  for (var i = 0; i < rows.length; i++) {
4584
- var args = { data: currentData[parseInt(i.toString(), 10)], row: rows[parseInt(i.toString(), 10)] };
4606
+ var args = {
4607
+ data: currentData[parseInt(i.toString(), 10)],
4608
+ row: rows[parseInt(i.toString(), 10)]
4609
+ };
4585
4610
  _this.renderModule.RowModifier(args);
4586
4611
  }
4587
4612
  }
@@ -13413,6 +13438,9 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
13413
13438
  this.parent.grid.getContent().firstElementChild.scrollTop = 0;
13414
13439
  this.parent.grid.notify(virtualActionArgs, { setTop: true });
13415
13440
  }
13441
+ if (requestType === 'save' && this.parent.editSettings.newRowPosition === 'Bottom') {
13442
+ endIndex = counts.count;
13443
+ }
13416
13444
  //if ((this.prevendIndex !== -1 && this.prevstartIndex !== -1) &&
13417
13445
  //this.prevendIndex === endIndex && this.prevstartIndex === startIndex) {
13418
13446
  if (!isNullOrUndefined(this.expandCollapseRec) && (pageingDetails.actionArgs.requestType === 'virtualscroll' ||