plotly / dash-table-experiments

NO LONGER SUPPORTED - use https://github.com/plotly/dash-table instead
MIT License
174 stars 57 forks source link

front end filtering docs example #99

Closed andreapiso closed 5 years ago

andreapiso commented 5 years ago

Hi! The documentation at https://dash.plot.ly/datatable/filtering shows this callback for front end filtering:

@app.callback(
    Output('datatable-filter-container', "children"),
    [Input('datatable-filtering-fe', "data")])
def update_graph(rows):
    if rows is None:
        dff = df
    else:
        dff = pd.DataFrame(rows)

    return html.Div()

How would this work? We are saving the data in a variable dff that does not get used in any way, and we are returning an empty Div for the children property of the container. Is there some magic going on behind this?