I am using material-table and I would like to know if there is any way to adjust the width of this table. I have a table with only two columns and I can't get it to spread across the entire screen. Try as follows without result.
<div style={{ maxWidth: "100%" }}>
<MaterialTable
title="All zones"
columns={columns}
data={data}
options={options}
/>
</div>
The only way that worked for me to extend the width of the table was as follows. Any suggestions!!! Grateful in advance..
const columns = [
{
field: "name",
title: "Name",
cellStyle: { width: 600, maxWidth: 600 },
headerStyle: { width: 600, maxWidth: 600 }
},
{
field: "description",
title: "Description",
cellStyle: { width: 1000, maxWidth: 1000 },
headerStyle: { width: 1000, maxWidth: 1000 }
},
];