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

Layout without table?! #70

Open
AlexanderZvyagin opened this issue May 21, 2018 · 5 comments
Open

Layout without table?! #70

AlexanderZvyagin opened this issue May 21, 2018 · 5 comments

Comments

@AlexanderZvyagin
Copy link

If my layout does not contain the table, how can I 'insert' it?! For example, the following code does not work (there are no errors, but the table is not shown):

app.layout = html.Div([
    dcc.Location(id='url', refresh=False),
    html.Div(id='body'),
])

@app.callback(Output('body', 'children'),
              [Input('url', 'pathname')])
def display_page(pathname):
  return dt.DataTable()
@meteoDaniel
Copy link

I am having the same issue !

@JoshPrim
Copy link

JoshPrim commented Aug 29, 2018

Solution: #19

@T4rk1n
Copy link

T4rk1n commented Aug 29, 2018

The way dash handle the components lib dependencies is by inspecting the initial layout. If your initial layout doesn't contain a DashTable, it won't load the dash_table_experiments js bundle and you can't use the component in a callback.

You can solve this by having a dummy component in the initial layout.

@JoshPrim
Copy link

Thanks for your answer 👍

@AlexanderZvyagin
Copy link
Author

Because of this limitation, I use html.Table() in my code instead of dash-table-experiments.

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

4 participants