Previously, when using the experimental version, the specified query parameters were saved and could be used on other pages. Now, after setting a query parameter on one page, it is reset when moving to another.
Tell me, is this a feature of the implementation or is it a bug? Thx.
Thanks for flagging this issue! Is your app using st.rerun? Query parameters are expected to persist across pages, but there is currently a confirmed bug with st.query_params when used in conjunction with st.rerun (GitHub Issue here)
Thanks so much for sharing that example! I’ve investigated this further and this is actually intended behavior to simulate the same behavior of regular webpages.
Here are a few related GitHub Issues that explain the decision to make this change in more detail: #6725, #5505, #7982
Thanks for providing details of the changes to this approach. It would probably be great to show this information in the documentation so that it is explicit.
I’ll look into making the note more visible. It’s currently the last sentence before the “Repeated keys” section on the st.query_params page. Since it’s just one line, it’s definitely easy to miss. Thanks for highlighting.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.