The whole app rerun after closing the dialog in version 1.37

Hi,

Before version 1.37, we can use st.rerun to close the experimental_dialog with the current page status refresh.
But after upgrading to version 1.37, the whole app rerun, this take me to the initial page of my app.

I use a session_state to store which page content to display.
In page3, I opened a dialog, click a select button to choose an item from a list, that will close the dialog and rerun the whole app instead of page3.

Thanks

2 Likes

Hey,

I am encoutering the same behaviour using st.fragment. Previously I used st.rerun to “escape” the fragment context and to be able to use the input the fragment function collected out of the scope of the fragment (by writing it to the session_state). Now the whole app reruns.

Best regards
Fabian

1 Like

Experiencing the same issue as well - essentially makes dialog unusable for V 1.37

It appears that you may be experiencing this issue st.rerun reruns the entire page instead of just escaping the fragment resulting in other widgets loosing their state (since v.1.37) · Issue #9171 · streamlit/streamlit · GitHub

Can you take a look, and if that matches what you’re experiencing, it appears that issue has been fixed. To confirm, can you try installing streamlit-nightly and see if that resolves the issue? If that works, then the next official version of streamlit should include a fix for this bug.

If you don’t think this matches what you’re experiencing, and streamlit-nightly doesn’t fix it, could you look through the other open issues and if you don’t see a match would you be willing to open a new one?

1 Like

Hi blackary,

Thanks for the solution, it works for me, I installed the streamlit-nightly and now it appears good to me.

Best regards
Roger

Hey,

with the nightly build it works for me aswell! I submitted the issue on GitHub. Thank you very much for the swift fix!

Best regards
Fabian

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.