[BUG] dbc Tabs not showing default first tab anymore with Dash 4.2.0 and higher
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 24.4k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 13
Description
For any Dash version > 4.1.0, the dash-bootstrap-components (dbc) Tabs do not show the default 1st tab anymore.
With dash==4.1.0 and dash-bootstrap-components==2.0.4
With dash==4.4.1 and dash-bootstrap-components==2.0.4
With the following trivial example:
from dash import Dash, html
import dash_bootstrap_components as dbc
app = Dash(__name__, title="Dash Tab Test", external_stylesheets=[dbc.themes.BOOTSTRAP])
children = [dbc.Tab(html.H2(f"Test Tab {i}"), label=f"Tab {i}") for i in range(3)]
app.layout = (
html.Div(
[
dbc.Tabs(children=children)
]
),
)
if __name__ == "__main__":
app.run(debug=True)
Note: if you switch on the tabs back and forth, the tab contents appear again. It's just the first tab does not show up anymore by default. See also dbc documentation.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal Python example in the issue and reproduce it with Dash 4.1.0 versus 4.4.1 and dash-bootstrap-components 2.0.4. Trace the Tabs rendering and default-selection behavior; done when the first tab's contents appear on initial load and switching between tabs still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100