Width of column custom does not work in version 5 alpha
Describe the bug When try set width of column custom does not work in version 5 alpha, we only see in hte inspector 150px, as fixed value you set another value but this not change for example width: 110
Screenshots or gifs
Your environment details
- Device: desktop
- OS: Ubuntu 24.04
- Browser : Firefox
Ok I fix it with this hack in css
.rgGridContent { grid-template-columns: none !important; }
Column width should not be defined by adding the width property to the cell object under props. Instead, it should be set by passing an array to the columns prop of the ReactGrid component:
For example:
const columns = [
{ colIndex: 0, width: 220 },
{ colIndex: 1, width: 220 },
{ colIndex: 2, width: 220 },
{ colIndex: 3, width: 220 },
];
<ReactGrid columns={columns} />
Setting grid-template-columns to none via CSS is not recommended
I have tried the suggestions here.
Overriding grid-template-columns removes all flexibility and you need to know all your column width values beforehand. Although, it was the only way I could get any column width below 150px.
Setting the column width using the width property on columns passed to ReactGrid only works for values over 150px.
I need to go lower than 150px and have been unable to find a way to do that.