plotly / dash-table-experiments

NO LONGER SUPPORTED - use https://github.com/plotly/dash-table instead
MIT License
174 stars 57 forks source link

Layout without table?! #70

Open AlexanderZvyagin opened 6 years ago

AlexanderZvyagin commented 6 years ago

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 commented 6 years ago

I am having the same issue !

JoshPrim commented 6 years ago

Solution: https://github.com/plotly/dash-table-experiments/issues/19

T4rk1n commented 6 years ago

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 commented 6 years ago

Thanks for your answer 👍

AlexanderZvyagin commented 6 years ago

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