Skip to content

Commit a8635f6

Browse files
MKirovaMKirova
authored andcommitted
Minor fix for paths.
1 parent 88d47d9 commit a8635f6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-util.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,17 @@ export class PivotUtil {
2323
return typeof dim.member === 'string' ? recData[dim.member] : dim.member.call(null, recData);
2424
}
2525

26-
public static extractValuesFromDimension(dims: IPivotDimension[], recData: any) {
26+
public static extractValuesFromDimension(dims: IPivotDimension[], recData: any, path = []) {
2727
const vals = [];
2828
let lvl = 0;
29-
const path = [];
3029
let lvlCollection = vals;
3130
for (const col of dims) {
3231
const value = this.extractValueFromDimension(col, recData);
3332
path.push(value);
3433
const newValue = path.join('-');
3534
lvlCollection.push({ value: newValue });
3635
if (col.childLevels != null && col.childLevels.length > 0) {
37-
const childValues = this.extractValuesFromDimension(col.childLevels, recData);
36+
const childValues = this.extractValuesFromDimension(col.childLevels, recData, path);
3837
vals[lvl].children = childValues;
3938
vals[lvl].expandable = true;
4039
}

0 commit comments

Comments
 (0)