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

Bottom of AgGrid disappears - pagination and horizontal scrolling gone #231

Open
VolgardTheScientist opened this issue Aug 16, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@VolgardTheScientist
Copy link

VolgardTheScientist commented Aug 16, 2023

Bottom of my AgGrid component disappears - I cannot use pagination nor scroll horizontally.
AgGrid

The code I am using is:
def AgGrid_with_display_rules(df): gd = GridOptionsBuilder.from_dataframe(df) gd.configure_pagination(enabled=False, paginationAutoPageSize=False, paginationPageSize=3) gd.configure_default_column(editable=False, groupable=True) gd.configure_selection(selection_mode='multiple', use_checkbox=True) gridoptions = gd.build() grid_table = AgGrid(df, gridOptions=gridoptions, update_mode=GridUpdateMode.SELECTION_CHANGED, height=400, allow_unsafe_jscode=True ) sel_row = grid_table["selected_rows"] return grid_table, sel_row

And then I am calling the function with:
with st.container(): grid_table, sel_row = AgGrid_with_display_rules(df) sel_row_for_map = pd.DataFrame(sel_row)

I was hoping that st.container might resolve the issue, but not. Same problem with and without st.container. Also I don’t have any CSS that could be causing a problem.

I have also tried this: St-aggrid horizontal scroll bar disappears when I define a height - #9 by Egos but without success.

I am currently on AGgrid: 0.3.4.post3 - the 0.3.3 does cause my app to crash so I cannot downgrade.

I have also raised this on Streamlit Forum:
https://discuss.streamlit.io/t/bottom-of-aggrid-disappears-pagination-and-horizontal-scrolling-gone/49417

Will be grateful for any hints on how to handle this! Thanks.

@dwaltsch
Copy link

dwaltsch commented Aug 29, 2023

for people having the same issue with pagination dissapearing someone posted the solution here add custom_css={"#gridToolBar": {"padding-bottom": "0px !important"}} in the aggrid build options

@VolgardTheScientist
Copy link
Author

Thanks, that solves the problem!

@PablocFonseca PablocFonseca added the bug Something isn't working label Mar 21, 2024
@PablocFonseca PablocFonseca self-assigned this Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants