Closed laoxu0212 closed 1 year ago
I am not sure if this is a bug or a feature. In any case, you should check out dash.no_update
. Returning it for each output should avoid blocking the other callbacks.
I am not sure if this is a bug or a feature. In any case, you should check out
dash.no_update
. Returning it for each output should avoid blocking the other callbacks.
Thanks for you help, actually I have already tried it before, it has the same problem.
def update_table(a_clicked, b_clicked):
if dash.callback_context.triggered[-1]['prop_id'] == 'A.n_clicks':
print('A is clicked')
time.sleep(30)
return [{'A': 'A-clicked'}]
if dash.callback_context.triggered[-1]['prop_id'] == 'B.n_clicks':
print('B is clicked')
# After checking some data shortly less than 30s, decide not to change anything.
return dash.no_update
So I'm just trying to find a way to get it like 1.1.1
Hi I'm facing this issue also as my callback gets triggered multiple times and as I allow the first one the following calls which raise PreventUpdate disable the one that I allowed. Is there any update on this issue?
This repo is deprecated, dash-table has been incorporated into the main dash repo. For callbacks that takes longer than a couple seconds, we have background callbacks that offer better handling for this kind of situation.
Here is an example: If you click A, it may take a long long time to process it(like 30s). Inside of this 30s, B is clicked and triggered the same callback, let's say after some conditional judgement, it decides not to do anything.
But it will eventually
raise PreventUpdate
, and stop the A in the process as well(so I won't see "A is clicked").This problem wasn't seen in 1.1.1, but recently I upgraded my dash and start seeing that.
Is there any mechanism to let me still see "A-clicked" even B is clicked during that 30s sleep?