Skip to content

Keyed widget values are lost when switching the pages #48

@Yashar78

Description

@Yashar78

I have a two page application where in one of them I have a few widgets like text box which is connected to a session state variable via the key. It works fine until I am in this page but if I open the other page and comeback again then the widget values and their session state values are lost. I tried this solution https://gist.github.com/okld/8ca97ba892a7c20298fd099b196a8b4d
but it fails and shows the error:
Error details: Values for st.button, st.download_button, st.file_uploader, and st.form cannot be set using st.session_state.
Any suggestion?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions