Hello! I have a callback which has a button for Input and other variables as States
@app.callback(
dash.dependencies.Output(‘slider’, ‘value’),
[dash.dependencies.Input(‘submit-button’, ‘n_clicks’)],
[dash.dependencies.State(‘dropdown’, ‘value’),
dash.dependencies.State(‘slider’, ‘value’),]
)
def update_slider(drop_val, slider_oldval)
@app.callback(
dash.dependencies.Output(‘fig’, 'figure),
[dash.dependencies.Input(‘submit-button’, ‘n_clicks’)],
[dash.dependencies.State(‘dropdown’, ‘value’),
dash.dependencies.State(‘slider’, ‘value’)]
)
def update_figure(drop_val, slid_val)
‘slider’ depends on ‘dropdown’ and whenever I click on ‘submit-button’, the last callback gets the updated value of ‘dropdown’ and an old value of ‘slider’. An important issue is that ‘slider’ is updated using a previous value. I’m not sure how to do it to get the most updated value of ‘slider’ before this callback is executed. I would really appreciate your advises on this issue.
Thanks in advance.