Summary
I am building an app where a user modifies a dataframe that is pulled from my postgreSQL database and following modification, they submit the modified dataframe back to my database. However (and especially when a user pulls up the web app on mobile), there are some instances where they leave the webpage open for an extended period of time while filling in data and the webpage reloads, subsequently erasing the modifications they have made to the dataframe prior to submission. I am wondering the best way to try and solve this, perhaps a wake-lock? Or is there a way to use on_change in the experimental_data_editor for it to save the changes made?
Steps to reproduce
Code snippet:
edited_df=st.experimental_data_editor(df, key=f"edited_df{number}", num_rows='dynamic')
notes=st.text_input('Notes', key=f"notes{number}")
store_performed_workout=st.form_submit_button(f'Submit Workout Number {number+1}')
Expected behavior:
The sequence of events in my code is the dataframe is pulled from my database, displayed via st.experimental_data_editor, modified by user, and submitted back into database. I hope to find a solution where the modifications can be stored in some sort of variable, maybe automatically submitted into a new table in my databse that can be pulled from, or perhaps find a way to force the application to stay open allowing modifications to the dataframe to be made over time. Any advice?