Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

How to check if a State has changed in Dash Callback?

$
0
0

Hello! I have a callback which has a button for Input and other variables as States

@app.callback(
dash.dependencies.Output(…),
[dash.dependencies.Input(‘submit-button’, ‘n_clicks’)],
[dash.dependencies.State(‘dropdown’, ‘value’),
dash.dependencies.State(‘slider’, ‘value’)]
)

The thing is that ‘slider’ depends on ‘dropdown’ and whenever I click on ‘submit-button’, this callback gets the updated value of ‘dropdown’ and an old value of ‘slider’. I’m not sure how to do it to get ‘slider’ updated before this callback is executed. I would really appreciate your advises on this issue.

Thanks in advance.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 6271

Trending Articles