Since the introduction of the Selection class, I've not been able to programmatically change which rows of a DataTable are highlighted as I used to be able to do by manually editing the source.selected object. I can verify source.selected is updated, but it doesn't appear to push a visual change anymore?
Am I missing something about how to use the Selection class?
Thanks,
Dan
from __future__ import print_function
from bokeh.layouts import column
from bokeh.models import ColumnDataSource, Selection, Select, CustomJS
from bokeh.io import curdoc
from bokeh.models.widgets import Button, TableColumn, DataTable
Since the introduction of the Selection class, I've not been able to programmatically change which rows of a DataTable are highlighted as I used to be able to do by manually editing the source.selected object. I can verify source.selected is updated, but it doesn't appear to push a visual change anymore?
Am I missing something about how to use the Selection class?
Thanks,
Dan
from __future__ import print_function
from bokeh.layouts import column
from bokeh.models import ColumnDataSource, Selection, Select, CustomJS
from bokeh.io import curdoc
from bokeh.models.widgets import Button, TableColumn, DataTable
Hello there, it seems we found a similar issue (the github issue was closed 10th of may). We are trying to use the tap tool to select multiple glyphs on diferent figures that have some correlation to the one we tap and have achieve what seems to be a solution.
for glyphs in tap.renderers(there is only 3 graphicglyphs):
glyphs.data_source.selected.on_change(‘indices’, lambda attr, old, new : func())
However when we run the bokeh serve --show smth.py
We found erratic behaviour, console shows us (with a print) that at most func() is called once on each glyph and at least its called twice overall (mostrly is called tiwce and sometimes three times). however on different taps there is no response of func.
First we thought we where doing something wrong, however we found this mail and decided to print the indices list with an external button and even though we see no call from func, we see changes in the indices list.
Maybe we are doing something wrong, but we can’t seem to understand what. If there is more info needed please ask. Hopefully it’s something wrong on our side, but in the worst case scenario, how woul anyone recommend to bypass the issue?
Thanks in advance,
Javier
···
El miércoles, 2 de mayo de 2018, 16:19:35 (UTC-3), Bryan Van de ven escribió:
Actually there seems to be an old issue, can you add a comment to update with this MRE and note that it’s still not working?
Since the introduction of the Selection class, I’ve not been able to programmatically change which rows of a DataTable are highlighted as I used to be able to do by manually editing the source.selected object. I can verify source.selected is updated, but it doesn’t appear to push a visual change anymore?
Am I missing something about how to use the Selection class?
Thanks,
Dan
from future import print_function
from bokeh.layouts import column
from bokeh.models import ColumnDataSource, Selection, Select, CustomJS