Skip to content

Commit

Permalink
Merge pull request #3441 from IgniteUI/dpetev/tree-grid-child-batch-d…
Browse files Browse the repository at this point in the history
…elete

#3439 `generateRowPath` proper path order, cleanup extra calls
  • Loading branch information
bazal4o authored Dec 13, 2018
2 parents 3c142f0 + 8349d66 commit a9754d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export class IgxTreeGridAPIService extends GridBaseAPIService<IgxTreeGridCompone
rowCurrentValue: any,
rowNewValue: {[x: string]: any}) {
if (grid.transactions.enabled) {
const path = grid.generateRowPath(rowID).reverse();
const path = grid.generateRowPath(rowID);
const transaction: HierarchicalTransaction = {
id: rowID,
type: TransactionType.UPDATE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,8 @@ export class IgxTreeGridComponent extends IgxGridBaseComponent {
if (this.transactions.enabled) {
const rowId = this.primaryKey ? data[this.primaryKey] : data;
const path: any[] = [];
path.push(parentRowID);
path.push(...this.generateRowPath(parentRowID));
path.reverse();
path.push(parentRowID);
this.transactions.add({
id: rowId,
path: path,
Expand Down Expand Up @@ -467,7 +466,7 @@ export class IgxTreeGridComponent extends IgxGridBaseComponent {
record = record.parent;
}

return path;
return path.reverse();
}

/**
Expand Down

0 comments on commit a9754d9

Please sign in to comment.