-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Button inside button is resetting the page #931
Comments
This is working as streamlit was designed, the code reruns from top to bottom after every action, in that new run it will only have access to the latest action. In your example after pushing button 2 it doesn remember pushing button 1 before that. I guess you could do a ugly workaround like so:
If you dont have too many steps in your button trail :) |
Thanks for the clarification. |
I know the topic is closed but here is a functional workaround to this issue:
|
Hello all, I know the topic is closed but I have tried all the workarounds in this issue and none of them works. Here is a solution that worked for me : |
Summary
I have a scenario where, when a button is pressed, it should perform some action and then a new button should appear for further actions. But, when the new button is pressed, the current page is getting completely reset. Sample code as shown below,
Steps to reproduce
With the above-mentioned code snippet,
Expected behavior:
When 'Button 2' is pressed, the page should maintain previous information and execute further actions.
Actual behavior:
The complete page is getting reset.
Is this a regression?
No
Debug info
The text was updated successfully, but these errors were encountered: