Hi there,
I have an app where a user submits a value which is then picked up for analysis.
Upon submission of the value, I check to see if it’s acceptable. If not, I respond with “Rejected”.
If it is accepted, I respond with “Processing”.
When the analysis is completed, I respond with “Completed.”
How can I have 1 text field in the app layout that can represent all of these values, and be updated when different callbacks are completed?
Unfortunately, at the present time, Dash only allows 1 callback to update a component’s property. While you could have each scenario be assoc. with their own dcc.Store()
, and these be inputs to a callback that would update a status somewhere on your app, this seems a little messy.
You might have a better experience using Toast
messages (See Dash Bootstrap Components)…they recently updated their Toasts
to expire after a pre-defined timeperiod. However, you will still need to have one Toast
per feature scenario as you described. So, as i am typing this, you aren’t any better off.
What you might need to do is combine your callbacks into one, so the status message can be returned w/o the need to intermediate components…
Personally, I have adopted the use of multiple dcc.Store
components that I check to see which was triggered and output a status message accordingly…
Not sure if this reply helps or not…but it might trigger an idea of your own…