@syncfusion/ej2-treegrid 21.2.3 → 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') {
@@ -3804,13 +3826,18 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
3804
3826
  break;
3805
3827
  case 'downArrow':
3806
3828
  if (!this.enableVirtualization) {
3807
- parentTarget = e.target.parentElement;
3829
+ target = e.target;
3830
+ parentTarget = target.parentElement;
3831
+ var cellIndex = parentTarget.cellIndex;
3832
+ if (this.grid.getColumnByIndex(cellIndex).editType === 'dropdownedit' && isNullOrUndefined(this.grid.getColumnByIndex(cellIndex).edit['obj'])) {
3833
+ parentTarget = target;
3834
+ }
3808
3835
  summaryElement = this.findnextRowElement(parentTarget);
3809
3836
  if (summaryElement !== null) {
3810
3837
  var rowIndex = summaryElement.rowIndex;
3811
3838
  this.selectRow(rowIndex);
3812
- var cellIndex = e.target.cellIndex;
3813
- var row_1 = summaryElement.children[parseInt(cellIndex.toString(), 10)];
3839
+ var cellIndex_1 = e.target.cellIndex;
3840
+ var row_1 = summaryElement.children[parseInt(cellIndex_1.toString(), 10)];
3814
3841
  addClass([row_1], 'e-focused');
3815
3842
  addClass([row_1], 'e-focus');
3816
3843
  }
@@ -3821,7 +3848,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
3821
3848
  break;
3822
3849
  case 'upArrow':
3823
3850
  if (!this.enableVirtualization) {
3824
- parentTarget = e.target.parentElement;
3851
+ target = e.target;
3852
+ parentTarget = target.parentElement;
3853
+ var cellIndex = parentTarget.cellIndex;
3854
+ if (this.grid.getColumnByIndex(cellIndex).editType === 'dropdownedit' && isNullOrUndefined(this.grid.getColumnByIndex(cellIndex).edit['obj'])) {
3855
+ parentTarget = target;
3856
+ }
3825
3857
  summaryElement = this.findPreviousRowElement(parentTarget);
3826
3858
  if (summaryElement !== null) {
3827
3859
  var rIndex = summaryElement.rowIndex;
@@ -4571,7 +4603,10 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4571
4603
  var currentData = _this.getCurrentViewRecords();
4572
4604
  var rows = _this.getContentTable().rows;
4573
4605
  for (var i = 0; i < rows.length; i++) {
4574
- 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
+ };
4575
4610
  _this.renderModule.RowModifier(args);
4576
4611
  }
4577
4612
  }
@@ -13403,6 +13438,9 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
13403
13438
  this.parent.grid.getContent().firstElementChild.scrollTop = 0;
13404
13439
  this.parent.grid.notify(virtualActionArgs, { setTop: true });
13405
13440
  }
13441
+ if (requestType === 'save' && this.parent.editSettings.newRowPosition === 'Bottom') {
13442
+ endIndex = counts.count;
13443
+ }
13406
13444
  //if ((this.prevendIndex !== -1 && this.prevstartIndex !== -1) &&
13407
13445
  //this.prevendIndex === endIndex && this.prevstartIndex === startIndex) {
13408
13446
  if (!isNullOrUndefined(this.expandCollapseRec) && (pageingDetails.actionArgs.requestType === 'virtualscroll' ||