Skip to content

updating columns causes data to be rendered wrong #111

Answered by dandelionn
dandelionn asked this question in Q&A
Discussion options

You must be logged in to vote

I have found out that I need to modify this css variable: "--data-table-library_grid-template-columns" depending on how many columns I want to display,
const columnsCount = 6; getTableTheme = (columns) => { return
--data-table-library_grid-template-columns: repeat(${columns}, minmax(0px, 1fr))
`;
}

const theme = useTheme([
getTheme(),
{
Table: getTableTheme(columnsCount),
...customTheme
},
]);

return (
<CompactTable
theme={theme}
...
/>
)
`

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dandelionn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant