Hi all,
new to Dash and trying to experiment with a few things.
I have a situation where on dropdown should be linked to a second dropdown, but the second one had a callback attached to it. I need to change the value of the second dropdown based on the value of the first. I would like the latter not to trigger the callback attached to the 2nd dropdown. This second callback should be triggered only if the user clicked and changed the value. Is there any way to ‘silently’ change the value in the first instance without triggering any events?
How can I change the value of the second dropdown programmatically but not trigger the callback attached to it?
Many thanks!
#1st callback in chain. Here I want to change the value but not trigger the next callback in chain
@app.callback(
dash.dependencies.Output(‘dropDownID2’, ‘value’),
[dash.dependencies.Input(‘dropDownID1’, ‘value’)])
def change_the_value_of_2nd_dropdown_somehow(value):
pass
#2nd callback
@app.callback(
dash.dependencies.Output(‘SomethingElse’, ‘children’),
[dash.dependencies.Input(‘dropDownID2’, ‘value’)])
def change_something_based_on_value_of_2nd_dropdown_somehow(value):
pass