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
Don't rerun on widget interaction #5827
Comments
Not 100% sure, but it seems a hypothetical "rerun" argument in widgets might overlap with the behavior of the "key" argument that already exists (which controls when widgets are reset). |
An use case where this would be useful is a combination of a selectable dataframe (using streamlit aggrid) and an image gallery. The user would select which rows to display from the aggrid table. The problem with the current streamlit design is that when the user selects a row in the table, all of the previously rendered images (from previous row selections) will be re-loaded. It's not a porblem when you select 2 or 3 rows, but it becomes a problem when you select more than 10-20 rows. |
current roadblock that led me to this issue was:
Expectation is:
|
Pulled my hair out trying to implement this. Plsss implement this. Love streamlit but this is detering me away |
OK. This might be asking too much, but I am going to ask it anyway. In multi page setup I wish there was an option to freeze the pages and when navigating in between the pages you can maintain the data, results and values they are displaying. Most of my applications involve loading a large panda dataframe in a dashboard type page with lots of calculations. I wish I did not have to start fresh loading data and doing calculations all over again. I guess this requires streamlit to save the current state of the page completely and return it to the user when he/she goes back to the original page. This feature makes streamlit behave more like a regular application and, in my opinion, makes it more practical. OK I said it knowing that it has zero chance to be implemented. Regardless, I am very thankful to streamlit team for their great work. Keep up the good work and have a wonderful night |
It would be a very useful feature, especially when it is necessary to generate just one specific component without the need for a rerun. |
+1 |
When a user interacts with a widget, Streamlit always reruns the entire script. There are ways to get around this (forms, caching, ...) but sometimes it would be really useful to just do something like
st.slider(..., rerun=False)
.See requests in this very popular forum post: https://discuss.streamlit.io/t/how-to-prevent-the-reloading-of-the-whole-page-when-i-let-the-user-to-perform-an-action/10800/7
This touches on the fundamental of Streamlit so we'll need to think this through carefully. No guarantees that we'll do this anytime soon! If you have use cases, please post them here (and upvote the issue!) so we can prioritize and see what's the best way to solve all problems.
Community voting on feature requests enables the Streamlit team to understand which features are most important to our users.
If you'd like the Streamlit team to prioritize this feature request, please use the 👍 (thumbs up emoji) reaction in response to the initial post.
The text was updated successfully, but these errors were encountered: