Hi,
I have a data table which I create based on a callback from a date dropdown, like this:
@app.callback(
Output('output-date-filtered-df', 'data'),
[Input('input-single-date-picker', 'date')])
def update_date(date):
if date is None:
date_filtered_df = create_df_based_on_date('2015-08-25')
else:
date_filtered_df = create_df_based_on_date(date)
return date_filtered_df.to_dict(orient='records')
From the docs, the way to create native filtering would be:
@app.callback(
Output('output-component-filtered-df', 'children'),
[Input('output-date-filtered-df', 'data')])
def filter_table(rows):
if rows is None:
updated_df = df
else:
updated_df = pd.DataFrame(rows)
return html.Div()
The initial dataframe shows fine, but when I try to use the table filtering option nothing shows. What am I missing here?
Thanks!