Saving filters configuration in Streamlit Ag-grid

I have a solution here:

This allows the user to click an update button and save the state.