Closed
Description
Describe your context
Please provide us your environment, so we can easily reproduce the issue.
- replace the result of
pip list | grep dash
below
dash 2.17.0
dash-core-components 2.0.0
dash-html-components 2.0.0
dash-table 5.0.0
dash-bootstrap-components 1.6.0
Describe the bug
Using wildcards in ids for Outputs in the running kwarg does leads to itempath is undefined
error.
Expected behavior
Wildcards are properly resolved and matching components are updated while the callback is running.
MVE
from time import sleep
import dash_bootstrap_components as dbc
from dash import MATCH, Input, Output, callback
layout = [
dbc.Button(
"Test1",
id={"component": "button", "index": "1"},
),
dbc.Button(
"Test2",
id={"component": "button", "index": "2"},
),
]
@callback(
Output({"component": "button", "index": MATCH}, "color"),
Input({"component": "button", "index": MATCH}, "n_clicks"),
running=[
(Output({"component": "button", "index": MATCH}, "children"), "running", "finished"),
],
prevent_initial_call=True,
)
def test(_) -> str:
sleep(3)
return "warning"