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 #7

Closed
TzurV opened this issue Aug 19, 2024 · 1 comment

Comments

@TzurV
Copy link

TzurV commented Aug 19, 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.

@TzurV TzurV closed this as completed Aug 21, 2024
@TzurV
Copy link
Author

TzurV commented Aug 21, 2024

I posted in the wrong place. Created a new one: PablocFonseca/streamlit-aggrid#291 (comment)

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