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
With streamlit-aggrid==0.3.0 or higher and almost any recent version of streamlit, inluding streamlit==0.15.1 , if you have an app that uses a submit button, then the table will disappear when you e.g. try to sort it.
This does not occur with streamlit-aggrid=0.2.3.
Here is a minimal example:
import streamlit as st
import pandas as pd
from st_aggrid import AgGrid
import numpy as np
submit = st.button('Submit', key="submit")
if submit:
data = pd.DataFrame(np.random.randint(0,100,size=(100, 4)), columns=list('ABCD'))
else:
data = None
if data is not None:
AgGrid(data)
More testing shows even just a simple app will result in completely reloading all the data with interactions.
from st_aggrid import AgGrid
import pandas as pd
data = pd.DataFrame([[1,2,3,4],[2,3,4,5]], columns=list('ABCD'))
x = AgGrid(data)
The text was updated successfully, but these errors were encountered:
from st_aggrid import AgGrid
import pandas as pd
data = pd.DataFrame([[1,2,3,4],[2,3,4,5]], columns=list('ABCD'))
x = AgGrid(data)
It works. But you can tell from what's printed on the console and the delay that it is rerunning the entire script on many interactions including sort, filter. So if you put a time.sleep it will sleep with every interaction. This is not the case with 2.3.0.
gregd33
changed the title
Sorting/interactivity breaks with a submit button in >=0.3.0
Data completely reloads with sorting/filtering interaction with version >=0.3.0
Dec 6, 2022
With
streamlit-aggrid==0.3.0
or higher and almost any recent version of streamlit, inludingstreamlit==0.15.1
, if you have an app that uses a submit button, then the table will disappear when you e.g. try to sort it.This does not occur with
streamlit-aggrid=0.2.3
.Here is a minimal example:
More testing shows even just a simple app will result in completely reloading all the data with interactions.
The text was updated successfully, but these errors were encountered: