Skip to content

[BUG] dbc Tabs not showing default first tab anymore with Dash 4.2.0 and higher #3929

Description

@ghaarsma

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

Image

With dash==4.4.1 and dash-bootstrap-components==2.0.4

Image

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1needed for current cyclebugsomething brokensize: 3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions