Hi 👋
I'm upgrading to use the v2 beta version on a project and had some issues around the responsive table component. My bad If I'm doing something totally wrong but looks to me like this might be something that could be tweaked.
My table is dynamically created using the react-table library and the table cell values are rendered via a method. This used to work fine in v1, but in v2 due to the responsive changes and more specifically the getHeadingsFromChildren helper, we can no longer use anything other than a string as a child of Table.Cell.
My code:
<Table.Head>
{headerGroups.map((headerGroup) => {
const { ...headerGroupProps } = headerGroup.getHeaderGroupProps()
return (
<Table.Row {...headerGroupProps} key={headerGroupProps.key}>
{headerGroup.headers.map((column) => {
const { ...headerProps } = column.getHeaderProps()
return (
<Table.Cell
{...headerProps}
key={headerProps.key}
{column.render('Header')}
</Table.Cell>
)
})}
</Table.Row>
)
})}
</Table.Head>
What gets rendered now:

I fixed this for now by importing renderToString from react-dom/server but this isn't an ideal solution
Thanks
Hi 👋
I'm upgrading to use the v2 beta version on a project and had some issues around the responsive table component. My bad If I'm doing something totally wrong but looks to me like this might be something that could be tweaked.
My table is dynamically created using the
react-tablelibrary and the table cell values are rendered via a method. This used to work fine in v1, but in v2 due to the responsive changes and more specifically thegetHeadingsFromChildrenhelper, we can no longer use anything other than a string as a child ofTable.Cell.My code:
What gets rendered now:

I fixed this for now by importing
renderToStringfromreact-dom/serverbut this isn't an ideal solutionThanks