Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

LEGACY: dash-recipes/dash-dynamic-tabs.py seems outdated. #22

@lioneltrebuchon

Description

@lioneltrebuchon

dash-recipes/dash-dynamic-tabs.py is an example that is meant to show that one can chose to display tabs based on a condition (in the example, a button click).
I would find this behaviour useful because you could potentailly differentiate tabs depending on user privilege. So the difficulty is that the tabs are only known at runtime.

The example in dash-dynamic-tabs seems to be outdated. It uses a construct like so:

dcc.Tabs(
    tabs=[ ...

while the current dash examples use:

dcc.Tabs(children=[
    dcc.Tab(),
    dcc.Tab() ...

My current solution is to add css styling to the tabs: {'display': 'none'} or {'display':'block'} depending on the condition, and to add app.config['suppress_callback_exceptions']=True after initializing the app.

If I find a better solution and manage to make it run, I will try to pull-request it. I am completely new to Dash, so I am not sure that I will achieve something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions