Hi, I'm having trouble getting the DataGrid to fill 100% of its parent container's width.
Without flexgrow:
The grid width is limited to the sum of all column widths, leaving empty space on the right side of the container.
With flexgrow:
The columns start expanding infinitely (reaching 6000px+), far exceeding the parent container's width.
<Willow>
<HeaderMenu columns={{ ... }} {api}>
<Grid
bind:this={api}
sizes={{ rowHeight: 70 }}
data={entries}
{columns}
footer={true}
/>
</HeaderMenu>
</Willow>
Column configuration example:
const columns = [
{ id: "thumbnail", width: 90 },
{ id: "descriptor", flexgrow: 2 },
{ id: "supplier", flexgrow: 1 },
{ id: "type", width: 120 },
{ id: "actions", width: 100 },
];
What I've tried:
- Using flexgrow on columns without fixed width
- Adding CSS overrides (width: 100% !important) on .wx-grid, .wx-table-box, etc.
- Wrapping the Grid in a container with width: 100%
Is there a recommended way to make the grid responsive to its parent's width?
How should flexgrow be used correctly to prevent infinite expansion?
Thank you for your help!