suppressSizeToFit doesn't seem to have any effect

I’ve got a grid displayed where the columns/contents are dynamic so I’m hesitant to use maxWidth. I am using the auto resize trick found in Is there a way to autosize all columns by default (on rendering) with streamlit-aggrid? but I have a couple columns that have very long column names but small column contents. For these columns I would like to just use the default behavior of not autosizing the column so I am trying to use the supressSizeToFit parameter (see https://www.ag-grid.com/javascript-data-grid/column-sizing/#size-columns-to-fit, and https://www.ag-grid.com/javascript-data-grid/column-properties/#reference-width).
I am using this for a specific column using the GridOptionsBuilder.configure_column() method, but the column still gets auto-resized with all the rest of them.

Has anyone had success suppressing a column from the autoresize? Anther option I tried was using the initialWidth and width properties (also found here https://www.ag-grid.com/javascript-data-grid/column-properties/#reference-width), but didn’t have any luck with it either.

Hi @jptfs :wave:

Instead of using the GridOptionsBuilder.configure_column() method, have you tried setting the properties directly in the column definitions (colDefs)?

colDefs = [
    {
        "headerName": "Long Column Name",
        "field": "longColumnName",
        "suppressSizeToFit": True,
        # Add any other properties, as needed.
    },
    # ... Other columns
]

Best,
Charly