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

Extra Spaces showing when using streamlit-aggrid #651

Open
Abdelgha-4 opened this issue Nov 9, 2023 · 0 comments
Open

Extra Spaces showing when using streamlit-aggrid #651

Abdelgha-4 opened this issue Nov 9, 2023 · 0 comments

Comments

@Abdelgha-4
Copy link

Here is a minimal code that reproduce the issue:

import streamlit as st
from st_aggrid import AgGrid
import pandas as pd

data = pd.DataFrame({'col1': [1, 2], 'col2': [3, 4]})
AgGrid(data)
st.write("test")

with requirements: ["streamlit-aggrid"].

You can see an extra space showing after the aggrid table.
image

However this is very inconsistent, for example if you reduce the page width in the above example, the extra space will disappear.
image

This inconsistency could be seen more when interacting with other streamlit components
For example modifying the above example with:

i = st.selectbox("select", [1, 2, 3])
data = pd.DataFrame({'col1': [i, 2], 'col2': [3, 4]})

You can see that with each change in the select box, the extra space might show or disappear !

Investigation:
By analyzing the html, I can see that the changes occur in the height of the iframe containing the aggrid table.
My guess is that some JS code responsible for setting the Aggrid height gets interrupted by stlite before it runs completly.

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