Summary
I have created a Streamlit app for PDF information extraction. It has 7 pages (7 py files saved in /pages folder). The issue is that on switching between pages from the sidebar, the progress in the previous page is lost.
Steps to reproduce
You can find this by checking this app from the Streamlit App Gallery
- Zoom into the map in the draw support page
- Select any other page
- Return back to the draw support page
Expected behavior:
The map is still zoomed in
Actual behavior:
Progress/operations (here zooming into the map) done in the page is gone. The page is refreshed.
Debug info
- Streamlit version: 1.22.0
- Python version: 3.9
Additional information
One solution is changing from multiple pages to multiple tabs in a single page (st.tabs). Since there is a lot going on each page, converting them to tabs caused delay in loading.
How can I preserve the state of the pages?