You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an app that has multiple pages, each of which has an Aggrid element hidden inside an expander. If I switch between pages and expand these, I find the Aggrid element often doesn’t display unless I manually rerun the page. I tried to make a minimal example here, using a toggle to simulate multiple pages. (the “working example” can be commented out, it’s just to show what’s necessary to reproduce the issue). I'm using streamlit version 1.30.0 and streamlit-aggrid version 0.3.4.post3
import streamlit as st
from st_aggrid import AgGrid
import pandas as pd
data = {
'System Name': ['System A', 'System B', 'System C', 'System D'],
'Value 1': [10, 20, 30, 40],
'Value 2': [1, 2, 3, 4]
}
df = pd.DataFrame(data)
# this works
if st.toggle("Expander and non-expander"):
st.write("some text (toggle on)")
else:
with st.expander("Expand (toggle off)"):
AgGrid(df, key="aggrid1")
# this breaks - aggrid element often won't appear when expanded
if st.toggle("Expander and expander"):
with st.expander("Expand (toggle off)"):
AgGrid(df, key="aggrid2")
else:
with st.expander("Expand (toggle on)"):
st.write("some text (toggle on)")
The text was updated successfully, but these errors were encountered:
I have an app that has multiple pages, each of which has an Aggrid element hidden inside an expander. If I switch between pages and expand these, I find the Aggrid element often doesn’t display unless I manually rerun the page. I tried to make a minimal example here, using a toggle to simulate multiple pages. (the “working example” can be commented out, it’s just to show what’s necessary to reproduce the issue). I'm using streamlit version 1.30.0 and streamlit-aggrid version 0.3.4.post3
The text was updated successfully, but these errors were encountered: