☰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

Trigger JS callback on data table edit

Community Support
d-que
d-que

Hello everyone,

I am in the following situation: I have a data table where I would like to trigger a CustomJS upon some data getting edited in my table when editable is set to true. Is that possible and if yes, how?

I tried data_table.source.js_on_change

But that didn’t work. Many thanks in advance!

⌁   Link to post
Bryan
Bryan

As an aside I feel like it used to be the case that source.js_on_change('data', ...) would work here, but I also think we had somehow gone out of our way to make that happen, and in retrospect it was inconsistent with how things work everywhere else (a change on .data means an assignment to .data, except here). So, I guess I am glad it only works now using the "patching" event. That said, I think there should probably be a dedicated event for table cell editing, since "patching" is a bit of an implementation detail. So please feel free to open a GH issue to discuss improvements.

⌁   Link to post
p-himik
p-himik

Can you expand a bit on why patching is an implementation detail? What about streaming? Maybe they should be not fictitious attributes but rather proper events that could be handled with js_on_event?

⌁   Link to post
Bryan
Bryan

I mean only that cell editors happen to implement their updates by calling source.patch because it is convenient. It’s not inconceivable that things could be implemented differently without using source.patch, if some requirements or other consideration comes up. Except, of course, that we paint ourselves in to a corner by not providing a purposeful, scoped event for cell editing that can be maintained independently of underlying implementation.

⌁   Link to post

End of archived discussion · Replies are disabled