Skip to content

Commit 17b477b

Browse files
committed
remove guard clause to prevent update. The callback should always update
1 parent dc56682 commit 17b477b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

components/dash-core-components/tests/integration/dropdown/test_remove_option.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,13 @@ def on_click(n_clicks):
4141

4242
@app.callback(Output("value-output", "children"), [Input("dropdown", "value")])
4343
def on_change(val):
44-
if not val:
45-
raise PreventUpdate
46-
return val or "None"
44+
return val or "Nothing Here"
4745

4846
dash_dcc.start_server(app)
4947
btn = dash_dcc.wait_for_element("#remove")
5048
btn.click()
5149

52-
dash_dcc.wait_for_text_to_equal("#value-output", "None")
50+
dash_dcc.wait_for_text_to_equal("#value-output", "Nothing Here")
5351

5452

5553
@pytest.mark.parametrize("searchable", (True, False))

0 commit comments

Comments
 (0)