@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.
@@ -2146,6 +2146,10 @@ class DataManipulation {
2146
2146
  qry.expand(expandDetail);
2147
2147
  }
2148
2148
  qry.where(this.parent.parentIdMapping, 'equal', rowDetails.record[this.parent.idMapping]);
2149
+ if (rowDetails.action === 'remoteExpand' && this.parent.grid.filterModule && this.parent.grid.filterModule['value']) {
2150
+ const filterqry = this.parent.grid.getDataModule().generateQuery().queries.filter((e) => e.fn !== 'onPage' && typeof e.e.predicates !== 'undefined');
2151
+ qry.queries.push(filterqry[0]);
2152
+ }
2149
2153
  showSpinner(this.parent.element);
2150
2154
  dm.executeQuery(qry).then((e) => {
2151
2155
  const remoteExpandedData = 'remoteExpandedData';
@@ -2167,7 +2171,25 @@ class DataManipulation {
2167
2171
  });
2168
2172
  }
2169
2173
  const haveChild = getObject('actual.nextLevel', e);
2170
- const result = e.result;
2174
+ let result = e.result;
2175
+ const resultChildData = [];
2176
+ if (rowDetails.action === 'remoteExpand' && this.parent.grid.filterModule && this.parent.grid.filterModule['value']) {
2177
+ for (let i = 0; i < datas.length; i++) {
2178
+ 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) {
2179
+ datas.splice(i, 1);
2180
+ i--;
2181
+ }
2182
+ }
2183
+ for (let i = 0; i < result.length; i++) {
2184
+ if (rowDetails.record['' + this.parent.idMapping] !== result[parseInt(i.toString(), 10)]['' + this.parent.idMapping] &&
2185
+ rowDetails.record['' + this.parent.idMapping] === result[parseInt(i.toString(), 10)]['' + this.parent.parentIdMapping]) {
2186
+ if (Object.prototype.hasOwnProperty.call(result, i)) {
2187
+ resultChildData.push(result[parseInt(i.toString(), 10)]);
2188
+ }
2189
+ }
2190
+ }
2191
+ result = resultChildData;
2192
+ }
2171
2193
  rowDetails.record.childRecords = result;
2172
2194
  for (let r = 0; r < result.length; r++) {
2173
2195
  if (this.parent.enableVirtualization && result[parseInt(r.toString(), 10)][`${this.parent.idMapping}`] === rowDetails.record[`${this.parent.idMapping}`] && rowDetails.action === 'remoteExpand') {
@@ -3538,7 +3560,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
3538
3560
  break;
3539
3561
  case 'downArrow':
3540
3562
  if (!this.enableVirtualization) {
3541
- parentTarget = e.target.parentElement;
3563
+ target = e.target;
3564
+ parentTarget = target.parentElement;
3565
+ const cellIndex = parentTarget.cellIndex;
3566
+ if (this.grid.getColumnByIndex(cellIndex).editType === 'dropdownedit' && isNullOrUndefined(this.grid.getColumnByIndex(cellIndex).edit['obj'])) {
3567
+ parentTarget = target;
3568
+ }
3542
3569
  summaryElement = this.findnextRowElement(parentTarget);
3543
3570
  if (summaryElement !== null) {
3544
3571
  const rowIndex = summaryElement.rowIndex;
@@ -3555,7 +3582,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
3555
3582
  break;
3556
3583
  case 'upArrow':
3557
3584
  if (!this.enableVirtualization) {
3558
- parentTarget = e.target.parentElement;
3585
+ target = e.target;
3586
+ parentTarget = target.parentElement;
3587
+ const cellIndex = parentTarget.cellIndex;
3588
+ if (this.grid.getColumnByIndex(cellIndex).editType === 'dropdownedit' && isNullOrUndefined(this.grid.getColumnByIndex(cellIndex).edit['obj'])) {
3589
+ parentTarget = target;
3590
+ }
3559
3591
  summaryElement = this.findPreviousRowElement(parentTarget);
3560
3592
  if (summaryElement !== null) {
3561
3593
  const rIndex = summaryElement.rowIndex;
@@ -4297,7 +4329,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
4297
4329
  const currentData = this.getCurrentViewRecords();
4298
4330
  const rows = this.getContentTable().rows;
4299
4331
  for (let i = 0; i < rows.length; i++) {
4300
- let args = { data: currentData[parseInt(i.toString(), 10)], row: rows[parseInt(i.toString(), 10)] };
4332
+ const args = {
4333
+ data: currentData[parseInt(i.toString(), 10)],
4334
+ row: rows[parseInt(i.toString(), 10)]
4335
+ };
4301
4336
  this.renderModule.RowModifier(args);
4302
4337
  }
4303
4338
  }
@@ -12981,6 +13016,9 @@ class VirtualScroll$1 {
12981
13016
  this.parent.grid.getContent().firstElementChild.scrollTop = 0;
12982
13017
  this.parent.grid.notify(virtualActionArgs, { setTop: true });
12983
13018
  }
13019
+ if (requestType === 'save' && this.parent.editSettings.newRowPosition === 'Bottom') {
13020
+ endIndex = counts.count;
13021
+ }
12984
13022
  //if ((this.prevendIndex !== -1 && this.prevstartIndex !== -1) &&
12985
13023
  //this.prevendIndex === endIndex && this.prevstartIndex === startIndex) {
12986
13024
  if (!isNullOrUndefined(this.expandCollapseRec) && (pageingDetails.actionArgs.requestType === 'virtualscroll' ||