How do I tell AgGrid not to shorten my column headers? By default I'd like to be able to see the full column headers when the grid loads and not have to resize them.
P粉4690907532023-09-14 11:00:25
You can specify the minimum width of each column using minWidth a>. You can also set suppressSizeToFit to true to prevent AgGrid from calling api.sizeColumnsToFit(params).
// for specific column const columnDefs = [ { field: 'athlete', width: 150, suppressSizeToFit: true }, { field: 'age', width: 50, minWidth: 50 }, { colId: 'country', field: 'country', minWidth: 300 }, { field: 'year', width: 90 }, ]; // for all columns const defaultColDef = { suppressSizeToFit: true }