Open vavanv opened 3 years ago
I've figured it out
const calcTableHeight = () => window.innerHeight - 390 + 'px';
const [tableHeight, setTableHeight] = React.useState(calcTableHeight);
React.useEffect(() => {
window.onresize = () => setTableHeight(calcTableHeight);
}, []);
use in options
options={{
...
fixedHeader: true,
tableBodyHeight: tableHeight,
...
}}
"react": "^17.0.2", "@mui/material": "^5.0.6", "mui-datatables": "^4.0.0",
is it possible to have fixed title and grid resizable vertically to allocate 100% browser real estate ?
tableBodyHeight allows 100% but the fixed header does not work