I am in the process of upgrading an app to Dash 1.0.x.
I have a custom dash component that wraps react-table and applies extra styling and other things.
However, the table sort no longer works once I upgrade from Dash 0.41 -> 0.42 - the break is either in dash
or in dash-renderer
but am unable to find the root cause. Filtering and other elements of the table still work. No JS/dash errors are thrown.
A LOT changed in that version bump but appear mostly to be new files related to debug mode and callback visualizations.
Any help debugging this would be appreciated.
A simple version of this to debug with:
pip install dash==0.41.0 solvebio-dash-components==0.6.6
Run the simple app code below. Column sorting works just fine.
Then pip install dash==0.42.0
and now column sorting breaks.
import json
import dash
import solvebio_dash_components as sdc
import dash_html_components as html
from dash.dependencies import Input, Output
app = dash.Dash(__name__)
columns = [
{
'Header': 'Column A',
'accessor': 'a',
},
{
'Header': 'Column B',
'accessor': 'b',
}
]
app.layout = html.Div(
children=[
html.Div(
sdc.DashReactTable(
id='table-summary',
data=json.dumps([
dict(a=1, b=3),
dict(a=2, b=4),
dict(a=10, b=100),
]),
columns=json.dumps(columns),
),
),
html.Div(
html.H1("Sorted header", id="sorted-output")
),
html.Div(
html.H1("Sorted data", id="table-data")
)
]
)
@app.callback(
Output('table-data', 'children'),
[Input('table-summary', 'data')])
def trigger_update(x):
return x
@app.callback(
Output('sorted-output', 'children'),
[Input('table-summary', 'sorted')])
def trigger_update2(y):
return y
if __name__ == '__main__':
app.run_server(debug=True)