Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit a384783

Browse files
committed
fix(plugins/plugin-client-common): tables with inferred headers never allow for grid presentation
Fixes #6763
1 parent c733449 commit a384783

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plugins/plugin-client-common/src/components/Content/Table/PaginatedTable.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ export default class PaginatedTable<P extends Props, S extends State> extends Re
141141

142142
public static getDerivedStateFromProps(props: Props, currentState?: State) {
143143
try {
144-
const { header, body, footer, defaultPresentation } = props.response
144+
const { header = kuiHeaderFromBody(props.response.body), body, footer, defaultPresentation } = props.response
145+
props.response.header = header
145146

146147
const asGrid =
147148
((!defaultPresentation || defaultPresentation === 'grid') &&
@@ -162,7 +163,7 @@ export default class PaginatedTable<P extends Props, S extends State> extends Re
162163
body,
163164
asGrid,
164165
footer,
165-
header: header || kuiHeaderFromBody(body),
166+
header,
166167
asSequence,
167168
response: props.response,
168169
pageSize: props.pageSize || defaults.pageSize

0 commit comments

Comments
 (0)