Skip to content

Commit

Permalink
Merge pull request #10490 from IgniteUI/rkaraivanov/fix-10489
Browse files Browse the repository at this point in the history
fix(grid): Groupby stack error on a single group
  • Loading branch information
ChronosSF committed Nov 15, 2021
2 parents a8f6555 + 4650887 commit 5425c65
Showing 1 changed file with 14 additions and 2 deletions.
Expand Up @@ -150,8 +150,20 @@ export class IgxSorting implements IGridSortingStrategy {
fullResult.data.push(groupItem);
}
if (expanded) {
metadata.push(...fullResult.metadata.slice(fullResult.metadata.length - group.length));
result.push(...fullResult.data.slice(fullResult.data.length - group.length));
// Replaced object destructing as in a single big group scenario
// it hits the max number of arguments for a function the underlying JS engine
// supports.
let j = fullResult.metadata.length - group.length;

for (; j < fullResult.metadata.length; j++) {
metadata.push(fullResult.metadata[j]);
}

j = fullResult.data.length - group.length;

for (; j < fullResult.data.length; j++) {
result.push(fullResult.data[j]);
}
}
}
i += group.length;
Expand Down

0 comments on commit 5425c65

Please sign in to comment.