Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

columns width and autoHeight in streamlit settings using configure_column() not working #291

Open
TzurV opened this issue Aug 21, 2024 · 0 comments

Comments

@TzurV
Copy link

TzurV commented Aug 21, 2024

Why the following two options do not result in the same table design?

gridOptions = {
    'columnDefs': [
        {'field': 'ID', 'width': 70},
        {'field': 'name', 'width': 150},
        {'field': 'status', 'width': 80},
        {'field': '_', 'width': 50},
        {'field': 'Recomendation', 'width': 350,
            'wrapText': True, 'autoHeight': True},
    ],
}
AgGrid(df, gridOptions=gridOptions)

and

gb1 = GridOptionsBuilder.from_dataframe(df)
gb1.configure_column("ID", width=70)
gb1.configure_column("name", width=150)
gb1.configure_column("status", width=80)
gb1.configure_column("_", width=50)
gb1.configure_column("Recomendation", width=150, wrapText=True, autoHeight=True)

gridOptions1 = gb1.build()

 grid_response = AgGrid(df, gridOptions=gridOptions1)

The second option, width and autoHeight, does not work. In the second option configure_column fails to set the width.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant