The “Advanced Callbacks” section of the documentation describes how to determine which input triggered a (multi input) server-side callback.
Is there a way to determine which input triggered a client-side callback?
The “Advanced Callbacks” section of the documentation describes how to determine which input triggered a (multi input) server-side callback.
Is there a way to determine which input triggered a client-side callback?
Are you referring to this?:
ctx = dash.callback_context
triggered_input = ctx.triggered[0]['prop_id']
triggered_input
here then is basically the triggered input component’s ID.
Thanks. Should this work in a client-side callback? I get the following error in my browser console:
Reference error: dash is not defined
I see that client-side callback_context
was added in version 1.13.0 via #1240, but dash_clientside.callback_context
shows up as undefined
for me. I’m running Dash version 1.19.
How does one access dash_clientside.callback_context
?
I just wanted to bump this topic; I have the same question and would appreciate an answer as well!
You can use window.dash_clientside.callback_context
which has the same attributes as the server side one.