DashTable: Can't update sorting_settings once user has manipulated them

I just wanted to check I’m not missing something before I report this as a bug, but using dash_table 3.4.0 the sort_settings can be updated via a callback until the user manually changes the sort settings, e.g.:

import random
import dash
import dash_table
import dash_html_components as html
from dash.exceptions import PreventUpdate

# initialise the server
app = dash.Dash(__name__)
COLUMNS = ('A', 'B', 'C')
ROWS = 10

app.layout = html.Div([
    html.Button('Change Order', id='change-order'),
        columns=[{"name": c, "id": c} for c in COLUMNS],
        data=[{c: random.randint(0, 9) for c in COLUMNS} for _ in range(ROWS)],
        sorting_settings=[{'column_id': c, 'direction': 'asc'} for c in COLUMNS],
        style_table={'width': '200px'}

    output=dash.dependencies.Output('data-table', 'sorting_settings'),
    inputs=[dash.dependencies.Input('change-order', 'n_clicks')])
def update_sorting(n_clicks):
    if n_clicks is None:
        raise PreventUpdate

    if n_clicks % 2 == 0:
        return [{'column_id': c, 'direction': 'asc'} for c in COLUMNS]
        return [{'column_id': c, 'direction': 'desc'} for c in reversed(COLUMNS)]

if __name__ == '__main__':

If you click the change order button before clicking the manual sort options the order of the table will change as expected. However if you manually change the sorting of the table and then click the change order button nothing happens.

I’ve reported as a bug, I’ll update this post when/if fixed.

Edit: This was fixed with Dash 0.40