Skip to content

Commit d129417

Browse files
authored
fix(AnalyticalTable): always return correct column property in onRowExpandChange (#4839)
1 parent 2ba1688 commit d129417

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/main/src/components/AnalyticalTable/hooks/useToggleRowExpand.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@ import { enrichEventWithDetails } from '@ui5/webcomponents-react-base';
22

33
const getToggleRowExpandedProps = (rowProps, { row, instance, userProps }) => {
44
const { dispatch, manualGroupBy } = instance;
5-
const { onRowExpandChange, isTreeTable, renderRowSubComponent } = instance.webComponentsReactProperties;
5+
const { onRowExpandChange, isTreeTable, renderRowSubComponent, alwaysShowSubComponent } =
6+
instance.webComponentsReactProperties;
67
const onClick = (e, noPropagation = true) => {
78
if (noPropagation) {
89
e.stopPropagation();
910
}
1011

1112
row.toggleRowExpanded();
1213
let column = null;
13-
if (!isTreeTable && !renderRowSubComponent) {
14+
if (!isTreeTable && (!renderRowSubComponent || (renderRowSubComponent && alwaysShowSubComponent))) {
1415
if (!manualGroupBy) {
1516
column = row.cells.find((cell) => cell.column.id === row.groupByID)?.column;
1617
} else {

0 commit comments

Comments
 (0)