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

ColumnAutoSizeMode makes first two columns shrunk #290

Open
ddtjco opened this issue Aug 16, 2024 · 0 comments
Open

ColumnAutoSizeMode makes first two columns shrunk #290

ddtjco opened this issue Aug 16, 2024 · 0 comments

Comments

@ddtjco
Copy link

ddtjco commented Aug 16, 2024

I'm on Python V 3.11.1 and Streamlit Aggrid version 1.0.5.

When using the ColumnsAutoSizeMode, it seems to always resize the first two columns of the grid to as small as possible, often hiding the majority of the data in the grid.

Here are my settings:

##DisplayGrid(df)    
        grid_options = GridOptionsBuilder.from_dataframe(df)
        grid_options.configure_pagination(enabled=True,paginationPageSize=50,paginationAutoPageSize=False)  # Enable auto pagination size
        grid_options.configure_side_bar(filters_panel=True,columns_panel=False)  # Enable side bar for additional controls
        grid_options.configure_grid_options(enableRangeSelection=True, quickFilterText = quick_filter_text)
 
        ##Custom CSS
        customcss = {
        "#gridToolBar": {"padding-bottom": "0px !important"}
        }

        # Display the grid
        AgGrid(df, gridOptions=grid_options.build(), fit_columns_on_grid_load=False, theme='balham', reload_data=False, height=765, custom_css=customcss,columns_auto_size_mode=ColumnsAutoSizeMode.FIT_CONTENTS) 

And here's how it looks on the initial load:

image

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