You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- OS: Windows 11
- Browser: Edge
- Version 110.0.1587.41
Describe the bug
Using Dash DCC.Dropdown using Dynamic Options, nested within dcc.Loading returns empty list.
Upon inspection the callback fires twice, once retuning the options list for the dropdown as expected and once returns and empty list even though prevent update is used. This happens on any single key pressed in the search box of the dropdown. removing the DCC.Dropdown from being nested in dcc.loading resolves the issue.
The code example used is exactly as in the dash documentation, except for the dcc.loading wrapper.
@callback(
Output("add_new_wave_modal_entity_sel_id", "options"),
Input("add_new_wave_modal_entity_sel_id", "search_value"),
)
def update_options(search_value):
if not search_value:
raise PreventUpdate
return [o for o in glb.wave_entity_signals_dd_options if search_value in o["label"]]
Expected behavior
The dcc.dropdown list will populate according to the typed filter on the fly. the spinner of the dcc.loading will appear if the list takes time to appear.
Screenshots
The text was updated successfully, but these errors were encountered:
Describe the bug
Using Dash DCC.Dropdown using Dynamic Options, nested within dcc.Loading returns empty list.
Upon inspection the callback fires twice, once retuning the options list for the dropdown as expected and once returns and empty list even though prevent update is used. This happens on any single key pressed in the search box of the dropdown. removing the DCC.Dropdown from being nested in dcc.loading resolves the issue.
The code example used is exactly as in the dash documentation, except for the dcc.loading wrapper.
@callback(
Output("add_new_wave_modal_entity_sel_id", "options"),
Input("add_new_wave_modal_entity_sel_id", "search_value"),
)
def update_options(search_value):
if not search_value:
raise PreventUpdate
return [o for o in glb.wave_entity_signals_dd_options if search_value in o["label"]]
Expected behavior
The dcc.dropdown list will populate according to the typed filter on the fly. the spinner of the dcc.loading will appear if the list takes time to appear.
Screenshots
The text was updated successfully, but these errors were encountered: