Hi,
I was wondering what format is needed to update the data in a dash table.
For example
html.Div(
dash_table.DataTable(
id='file-table',
columns=[{"name": p, "id": p} for p in params],
style_cell={'textAlign': 'left'},
)
)
One of the columns is Filename, and after a callback from uploading files I want to update the values belonging to column Filename.
i’m doing something like this. Where df is a dataFrame that includes the filenames.
@app.callback(Output("file-table", "data"),
[Input('upload-data', 'contents')],
[State('upload-data', 'filename'),
State('upload-data', 'last_modified')])
def update_output(list_of_contents, list_of_names, list_of_dates):
return df.fileName.unique()
It does create the x amount of rows, but they are empty.