Sorting/ filtering still doesn't work in dash table after issue 202 is fixed

Hi all,

The issue, 202, ( is supposed to have fixed the sorting bug in dash table but I’m still facing the same issue.

I tried using a dummy callback which has been suggested before. The sample code is below. This doesn’t change any behavior. I have also tried to output the table to the Div container. In this case, the sorting just works once. I believe since it is not connected to the callback anymore, the sorting click doesn’t respond.

And finally, I also tried the back end sorting using “sort_by” attribute and that is not working either.

Any help is appreciated on this!

Front end Sorting code

                                           columns=[{"name": i, "id": i} for i in df_sub.columns],

@app.callback(Output('df_table', 'data'),
              [Input('df_table', 'derived_virtual_data')])
def dummy_fx(rows):

    dff = df if rows is None else pd.DataFrame(rows)

    return dff.to_dict('records')

Back end sorting code (callback)

@app.callback(Output('df_table', 'data'),
              [Input('df_table', 'sort_by')],
              [State('df_table', 'data')])
def dummy_fx(sort_by, rows):
    dff = pd.DataFrame.from_dict(rows)

    if sort_by:
        dff = dff.sort_values(
            ascending=sort_by[0]['direction'] == 'asc',

    return dff.to_dict('records')