☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Bokeh callbacks with CustomJS: trigger a callback from another callback with custom JS?

Community Supportcustomjs
austintpg
austintpg

Is there a way to trigger a callback with CustomJS from inside another callback with custom JS? Additionally and related to the first question: is there a way to prevent triggering a callback when modifying the property or producing the event that triggers that callback? I have been trying to find information or a way to do this from the Bokeh docs but I can’t find anything.

⌁   Link to post
_jm
_jm

@austinpg

Bokeh models have a tag property. You can set up some simple state machinery in your code to set that, and if there is an on-change callback registered to the tag, a callback that modifies the tag will cause the tag’s on-change callback to run.

I’ve also used tags in situations similar to what I think you’re describing in the second, related question, to basically limit recurrence of callbacks due to interactions between elements that are necessary (i.e. your prevent triggering requirement).

Other’s might have better suggestions on how to proceed, but judicious use of the tag property has served my applications well in the occasional circumstance where needed.

⌁   Link to post

End of archived discussion · Replies are disabled