Hello - I am using variables to display information in my sidebar. The variables are called out of st.session_state, and everything seems to run smoothly initially.
I also have a button in the sidebar that changes the variables stored in the st.session_state. When I click the button everything displayed in the main page updates, but the variables in the side bar do not. I have to click a radio button (also in the sidebar) to force it to refresh itself. After I do this, the variables in the side bar do update appropriately.
Any idea what is going on here? In my code, the commands to display the variables in the sidebar do appear before the code for the button, but I don’t think that should matter.
Thanks very much
Edit I put the code that effects the state into a call back function that the button now calls, with the intent that this code would run before the page is re-run. No change in functionality from what I describe above.