dash
dash copied to clipboard
Callbacks with no output and pattern MATCH not allowing dash to run
Using a callback with no output in Dash 2.17.1 and using a MATCH pattern on the input from a data table prevents dash from loading.
Describe your context Create a simple single file app with a data table and a pattern matching callback with no output.
This works:
@callback(
Input({'type': 'data-table', 'index': ALL}, 'active_cell'),
State('url', 'pathname'),
)
def print_table_id_and_column(active_cell, pathname):
print("hello")
This however causes the app to not load at all. The only indication of an issue is in the browser console. screenshot provided below:
@callback(
Input({'type': 'data-table', 'index': MATCH}, 'active_cell'),
State('url', 'pathname'),
)
def print_table_id_and_column(active_cell, pathname):
print("hello")
Environment:
pip list | grep dash
dash 2.17.1
dash-bootstrap-components 1.5.0
dash-bootstrap-templates 1.1.2
dash-core-components 2.0.0
dash-extensions 1.0.14
dash-html-components 2.0.0
dash-iconify 0.1.2
dash_mantine_components 0.14.4
dash-table 5.0.0
Describe the bug
Uncaught error TypeError: Cannot read properties of undefined (reading 'id') prevents dash from running.
Expected behavior
I expect that using a callback with no output works with both ALL and MATCH pattern matching.
Screenshots