Replies: 1 comment 5 replies
-
Yes, here are a couple examples where you can either Give a table container a min height <MaterialReactTable
columns={columns}
data={data.slice(0, 5)}
muiTableContainerProps={{
sx: {
minHeight: '800px',
},
}}
/> or Make the table expand to exactly the parent div's height, though it takes a bit of calc of refs to get it right <div style={{ height: '700px' }}>
<MaterialReactTable
columns={columns}
data={data.slice(0, 5)}
muiTableContainerProps={({ table }) => ({
sx: {
height: `calc(100% - ${table.refs.topToolbarRef.current?.offsetHeight}px - ${table.refs.bottomToolbarRef.current?.offsetHeight}px)`,
},
})}
muiTablePaperProps={{
sx: {
height: '100%',
},
}}
/>
</div> |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is there any built-in support for rendering the table in 100% height of the parent component?
Beta Was this translation helpful? Give feedback.
All reactions