Hi community,
I have a working app that runs javascript code
on a button click -
button.js_on_click(CustomJS(args=dict(source=data), code=code))
where data
is a ColumnDataSource
object.
However I would like to instead trigger a Python callback on the button click -
button.on_click(func)
and then within func
in Python do two things:
(1) modify data
according to other values from the app (not an issue)
(2) execute code
as CustomJS(args=dict(source=data_modified), code=code)
Are you aware if Step (2) as above is even possible? Within func
I can create the CustomJS
object but then I am not sure how to get it to run as it would if connected with button.js_on_click
. Happy to provide an MRE, I usually do, was thinking maybe you’d know based on only these details in this case… thanks for the support!