Skip to content

Commit 6e36432

Browse files
MKirovaMKirova
authored andcommitted
fix(pivot): Extract hierarchy from original leaf records.
1 parent 3cff889 commit 6e36432

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

projects/igniteui-angular/src/lib/data-operations/pivot-strategy.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ export class PivotRowDimensionsStrategy implements IPivotDimensionStrategy {
5050
const newData = [...data];
5151
for (let i = 0; i < newData.length; i++) {
5252
const currData = newData[i][prevDim.memberName + '_' + pivotKeys.records];
53+
const leafData = PivotUtil.getDirectLeafs(currData, pivotKeys);
5354
const hierarchyFields = PivotUtil
54-
.getFieldsHierarchy(currData, [row], PivotDimensionType.Row, pivotKeys);
55+
.getFieldsHierarchy(leafData, [row], PivotDimensionType.Row, pivotKeys);
5556
const siblingData = PivotUtil
5657
.processHierarchy(hierarchyFields, newData[i] ?? [], pivotKeys, 0);
5758
PivotUtil.processSiblingProperties(newData[i], siblingData, pivotKeys);

0 commit comments

Comments
 (0)