I’m trying to update the underlying data in a DataTable from the dash-table-experiments repo.
I also use filters, and I would like to keep the filters applied, while updating the data.
The problem similar to this, so I assume it is not possible in its current form.
I tried getting the filters from the previous DataTable instance, and assign it to the new (following this), but that did not apply the filters as expected:
@app.callback(Output(dt_placeholder.id, 'children'), Input(interval.id, 'n_intervals'), State('datatable', 'filters')) def update_dirs(n, filters): dt_1 = dt.DataTable( id='datatable', rows=job_list.get_table_data(), columns=DEFAULT_COLS, filterable=True, sortable=True, filters=filters) return dt_1
Would you recommend another way to implement this?