Skip to content

Commit 59639a7

Browse files
authored
fix(AnalyticalTable): fix subcomponents calculation (#5004)
Fixes #3691
1 parent bf4a885 commit 59639a7

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

packages/main/src/components/AnalyticalTable/TableBody/RowSubComponent.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,19 @@ export const RowSubComponent = (props: RowSubComponent) => {
8585
});
8686
}
8787
}
88+
// recalc if row id of row index has changed
89+
if (
90+
subComponentsHeight?.[virtualRow.index]?.rowId != null &&
91+
subComponentsHeight?.[virtualRow.index]?.rowId !== row.id
92+
) {
93+
dispatch({
94+
type: 'SUB_COMPONENTS_HEIGHT',
95+
payload: {
96+
...subComponentsHeight,
97+
[virtualRow.index]: { subComponentHeight: subCompHeight, rowId: row.id }
98+
}
99+
});
100+
}
88101
}
89102
});
90103
});

0 commit comments

Comments
 (0)