Skip to content

Commit c39ae49

Browse files
committed
Allow components as running values.
1 parent 5ecfa7b commit c39ae49

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

dash/dash.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,10 @@ def interpolate_index(self, **kwargs):
11131113
)
11141114

11151115
def dependencies(self):
1116-
return flask.jsonify(self._callback_list)
1116+
return flask.Response(
1117+
to_json(self._callback_list),
1118+
content_type="application/json",
1119+
)
11171120

11181121
def clientside_callback(self, clientside_function, *args, **kwargs):
11191122
"""Create a callback that updates the output by calling a clientside

tests/integration/callbacks/test_basic_callback.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ def test_cbsc019_callback_running(dash_duo):
808808
@app.callback(
809809
Output("output", "children"),
810810
Input("start", "n_clicks"),
811-
running=[[Output("running", "children"), "on", "off"]],
811+
running=[[Output("running", "children"), html.B("on", id="content"), "off"]],
812812
prevent_initial_call=True,
813813
)
814814
def on_click(_):
@@ -819,7 +819,7 @@ def on_click(_):
819819
dash_duo.start_server(app)
820820
with lock:
821821
dash_duo.find_element("#start").click()
822-
dash_duo.wait_for_text_to_equal("#running", "on")
822+
dash_duo.wait_for_text_to_equal("#content", "on")
823823

824824
dash_duo.wait_for_text_to_equal("#output", "done")
825825
dash_duo.wait_for_text_to_equal("#running", "off")

0 commit comments

Comments
 (0)