PablocFonseca / streamlit-aggrid

Implementation of Ag-Grid component for Streamlit
https://pypi.org/project/streamlit-aggrid/
MIT License
1.05k stars 199 forks source link

Blank area above the table #215

Open rafa-guedes opened 1 year ago

rafa-guedes commented 1 year ago

My table is defined on the sidebar and there is a blank area that is rendered above it as shown on the image below. This was not occurring when I first wrote this app in February or so, it may have been introduced after some release of streamlit. I am currently running the latest version of streamlit==1.22.0.

Inspecting this element gives me the following:

<div class="ag-row-odd ag-row-no-focus ag-row ag-row-level-0 ag-row-position-absolute"><div class=""><div class="ag-cell-wrapper"></div></div></div>

Thanks

image

gustavjohansen98 commented 1 year ago

Use the custom_css param.

response = st_aggrid.AgGrid(
    df,
    gridOptions=builder.build(),
    custom_css={
        "#gridToolBar": {
            "padding-bottom": "0px !important",
        }
    }
)

Versions: