Dash DataTable - Updating Rows with Dropdowns

Thanks @Izzat! You should be able to just set a callback and update the rows property of the DataTable. Here’s some pseudo-code:

app.layout = html.Div([
    dcc.Dropdown(id='my-dropdown', ...),
    dt.DataTable(id='my-datatable')
])

@app.callback(Output('my-datatable', 'rows'), [Input('my-dropdown', 'value')])
def update_rows(selected_value):
    dff = df[df['some-column'] == value]
    return dff.to_dict('records')
1 Like