dear bossThe code I have developed generates the st.aggrid upon button press. However, when the user inputs any data and presses the tab key, the st.aggrid becomes hidden and refreshes. Additionally, if the user clicks on any field with the mouse, it refreshes again, preventing the user from entering data. Please provide me with the correct code that allows user data entry, followed by a button press to refresh the st.aggrid.
see my code
import streamlit as st
import pandas as pd
from st_aggrid import AgGrid
def tt():
df = pd.DataFrame({‘name’ : [‘User 1’, ‘User 2’, ‘User 3’],
‘role’ : [‘member’, ‘admin’, ‘moderator’]})
grid_return = AgGrid(df, editable=True, theme=‘streamlit’)
if st.button(‘new record Check availability’,on_click= tt):
st.write("testing ")