Now, I’m trying to make callback with dynamic states.
In detail, there are 2 systems for that.
If user select system1, then dcc.dropdown is displayed according to system1.
ex) Input1, Input2, Dropdown1
For system2, ex) Dropdown1, Dropdown2 …
so, there are dynamic States, and these are already developed in my source code.
But, the problem is, I don’t know how to make callback with it… Because states are dynamic…
Is there any way? Now I’m trying to make it like below. But it didn’t work…
@app.callback(Output(‘button-dummy’, ‘children’), [Input(‘button’, ‘n_clicks’)],
STATES) # STATES is a flexible list for system
def on_click_run(click, *args):
if system == system1:
things…
elif system == system2:
things…