-
Notifications
You must be signed in to change notification settings - Fork 56
Cannot dynamically create tables #28
Comments
@mewais - did you post the question here? https://community.plot.ly/t/data-tables-with-multi-pages/7282/3 |
Also, does it work if the |
Also, this example works for me:
(Taken from this thread in the community forum: https://community.plot.ly/t/dash-datatable-updating-the-number-of-rows/6448/2?u=chriddyp) |
Hey Chris, no that's not me I did not post the question. I just tried the example you posted here, It works! however, this line: I tried adding this seemingly useless line to my code and it also did work, the tables now shows up fine. So, my problem is now solved, but what is happening exactly? why does it work with this line? or why does it not work without it?! |
Did you see the callback below?
That callback is populating the For more about how callbacks work, read through the first section of the user guide: https://plot.ly/dash/getting-started-part-2 |
Sorry, I meant to copy the line below it, which is truely useless as it's a hidden table with empty rows. html.Div(DataTable(rows=[{}]), style={'display': 'none'}) |
see the comment in the community forum here: https://community.plot.ly/t/display-tables-in-dash/4707/40?u=chriddyp (similarly #19 ) |
Thanks |
Hello,
Tables are great, they work fine when used in a layout directly, something like this is OK:
But if you have a function create the table dynamically and assign it to the layout, tables do not even show up. This is needed for cases where you change the page content dynamically based on other inputs, for example If you decide whether to make a table or plot some figure based on a button, or if you want to have tables inside a tab body or so you'd have to do something like this:
This doesn't work, The table doesn't show up at all, and no error messages are printed.
The text was updated successfully, but these errors were encountered: