
I think 0.13 lost functionality to programmatically use selection indices? In 0.12.16, the code below will update the drop_down when I click on a row of the data_table. In 0.13, it does not. Am I not fully compatible with the relatively new Selection() functionality or perhaps there’s a bug in >=0.13?
Thanks,
Dan
from bokeh.layouts import column
from bokeh.io import curdoc
from bokeh.models.widgets import Select, TableColumn, DataTable
from bokeh.models import ColumnDataSource
source = ColumnDataSource(data=dict(row=[‘1’, ‘2’, ‘3’]))
def update_drop_down_on_selection(attr, old, new):
if new.indices:
drop_down.value = drop_down.options[min(new.indices)]
drop_down = Select(value=‘1’, options=[‘1’, ‘2’, ‘3’], width=50, title=“Row”)
data_table = DataTable(source=source, columns=[TableColumn(field=“row”, title=“Row”, width=60)])
source.on_change(‘selected’, update_drop_down_on_selection)
layout_query = column(drop_down, data_table)
curdoc().add_root(layout_query)
