I've so far only been able to "test" this change for ColumnsPatched, not form ColumnsStreamed, but I'd be happy to also "test" it if someone can indicate how to trigger it.
This example used to fail when updating the table in a notebook. Note it wraps the model with BokehModel from jupyter_bokeh (as discussed in https://github.com/bokeh/jupyter_bokeh/issues/199) to reproduce the issue with Bokeh code only, avoiding Panel.
from IPython.display import display
from jupyter_bokeh.widgets import BokehModel
from bokeh.io import output_notebook
from bokeh.models import ColumnDataSource, DataTable, TableColumn
output_notebook()
source = ColumnDataSource(dict(values=[0, 1, 2, 3, 4]))
columns = [TableColumn(field="values")]
data_table = DataTable(source=source, columns=columns, editable=True, height=150)
display(BokehModel(data_table))
Fixes https://github.com/holoviz/panel/issues/5513
I've so far only been able to "test" this change for
ColumnsPatched
, not formColumnsStreamed
, but I'd be happy to also "test" it if someone can indicate how to trigger it.This example used to fail when updating the table in a notebook. Note it wraps the model with
BokehModel
fromjupyter_bokeh
(as discussed in https://github.com/bokeh/jupyter_bokeh/issues/199) to reproduce the issue with Bokeh code only, avoiding Panel.The traceback that was raised in that case:
With the changes applied, it seems to work well: