Column Width not being respected
After the newly released 1.6.2, the column widths stopped being respected. Until now we just set the width parameter in the columns configuration and that made the columns have that width, but since the update, the column's widths are automatically calculated.
Did this configuration changed or is this a bug that was introduced? If this was intentional how should we lock the width of the columns from now on?
Example of how we've been doing so far:
const columns = [
{
title: "Status",
sorting: false,
render: ({ status }) => status,
},
{
render: (rowData) => getActionButtons(rowData),
width: 150,
},
{
title: "Actions",
field: "more",
sorting: false,
headerStyle: { textAlign: "center" },
cellStyle: { textAlign: "right" },
render: (rowData) => getButtons(rowData),
width: 120,
},
{
render: ({ uuid, status }) => getGoTo(uuid, status),
width: 40,
},
];
Sounds like this may fix that? https://github.com/mbrn/material-table/pull/2511
@zeckdude if the width parameter starts to be taken into account again, it should solve it.
Sounds like this may fix that? #2511
That will only allow us to apply width by using headerStyle / cellStyle together. Width is still overwritten with the CommonValues.reducePercentsInCalc function...
Ah ok. I reverted to 1.64.0 for now and that solved it
We reverted to 1.69.1 and locked it there for now, as it works as we expect.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.
Version 1.69.1 works fine for me to set the width of a column.
In version 1.69.2, the width seems to be ignored again.
1.69.3 - I don't see any regularity it the calculation of columns width.
columns={[
{ title: t('ID'), field: 'id', type: 'numeric', width: 1 },
{ title: t('Name'), field: 'name', width: 1 },
{ title: t('Bitrate'), field: 'bitrate', type: 'numeric', width: 2 },
]}
Changing 1 to 100 and 2 to 200 doesn't make any difference.
makes each column to have width: calc(146.333px); style. I.e. - equal.
So it's still buggy.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.
It would be nice if this issue can fixed. We are also locked on v1.69.1 due to this bug...
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.
Please fix this 🙏
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.
Bump, still not fixed
Still there in v2.0.3
You can use 1.69.0 until they resolve this bug.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.