st.tabs() error with interactive widgets
See original GitHub issueSummary
Assume that you have multiple (at least two) tabs. When you select something from a tab that is not the first one, it redirects you to the first tab. This only happens the very first time. Also, you see that any selection made is still there though.
Steps to reproduce
Code snippet:
import streamlit as st
tab_a, tab_b, tab_c = st.tabs(["Tab-A", "Tab-B", "Tab-C"])
with tab_a:
toggle_a = st.radio(label="toggle_a", options=["1a", "2a", "3a"], key="unique-a")
with tab_b:
toggle_b = st.radio(label="toggle_b", options=["1b", "2b", "3b"], key="unique-b")
with tab_c:
toggle_c = st.radio(label="toggle_c", options=["1c", "2c", "3c"], key="unique-c")
If applicable, please provide the steps we should take to reproduce the bug:
- Go to Tab-B or Tab-C
- Click on any radio button under Tab-B or Tab-C
Expected behavior: No UI changes when you select something from a widget in any of the tabs.
Actual behavior:
Is this a regression?
No
Debug info
- Streamlit version: 1.11.0
- Python version: 3.8.12
- Using Conda
- OS version: macOS Monterey V12.4 and python:3.8-slim-buster (Debian GNU/Linux 10)
- Browser version: Safari Version 15.5
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:14
Top Results From Across the Web
Stop switching tabs when I am adding in a new variable in tab
I have an app that dynamically adds/removes tabs (i.e. changes their set) based on a multiselect. There are a few problems: The tab...
Read more >Validate that tabs are moved to a target dashboard
When you move a dashboard with an update set, validate that the tabs are moved to the target instance and are populated.
Read more >Tabs Widget - jQuery UI API Documentation
For more information on widget extensions, see Extending Widgets with the Widget Factory. _getList()Returns: jQuery. Determine which list should be converted to ...
Read more >UM1718 User manual - STM32CubeMX for STM32 ...
following documents are available on www.st.com: ... Configuration window tabs (GPIO, DMA and NVIC settings for STM32F4 Series) .
Read more >ipywidgets Documentation - Read the Docs
from ipywidgets import interact, interactive, fixed ... You can close a widget by calling its close() method. ... tab = widgets.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The issue occurs for me on Chrome as well as Safari, so I don’t think the issue is just related to Safari.
Hi @LukasMasuch, I just noticed that I haven’t shared my answer to one of your questions. The issue is not happening with the deployed app that you shared with me.