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

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

Open
lioneltrebuchon opened this issue Jan 8, 2019 · 0 comments
Open

Comments

@lioneltrebuchon
Copy link

lioneltrebuchon commented Jan 8, 2019

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.

@lioneltrebuchon lioneltrebuchon changed the title BUG: dash-recipes/dash-dynamic-tabs.py seems outdated. LEGACY: dash-recipes/dash-dynamic-tabs.py seems outdated. Jan 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant