hi! We’re having some trouble with buttons in tabs. Anytime a user clicks a button outside of a form, the page refreshes itself instead of executing the code. Here’s a paraphrased version of the code:
While the form submission works fine, the button outside of the form reloads the page. Any ideas?
Hey @faisal.lalani, thanks for reporting this issue. Your issue might be related to a race condition we had with Streamlit version
1.10 that sometimes leads to the widget state being dropped and the page being refreshed. We fixed it in
1.11 (see this PR ). Is your app running with Streamlit
Yep! I think you need 1.11 anyway to use tabs, but I double checked anyway and I am using that version.
that’s true In that case, this is unrelated and probably a new unknown issue. Unfortunately, I’m not able to reproduce it with the following code (deployed app):
import streamlit as st
tab1, tab2, tab3 = st.tabs(["tab1", "tab2", "tab3"])
Do you have any code example that reproduces the issue?