I’m developing a system with DataTable and AutocompleteInput to filter.I ran the same code in bokeh 0.12.6 and 0.12.7, check below the code and figure.
In bokeh 0.12.6 the code work fine and only AutocompleteInput fail in style. I saw that this style problem in AutocompleteInput was solved in 0.12.7.
The problem is that DataTable not work in 0.12.7 and i have no idea what’s happening.
from bokeh.layouts import widgetbox
from bokeh.models import ColumnDataSource
from bokeh.models.widgets import DataTable, TableColumn, AutocompleteInput
from bokeh.io import curdoc
import pandas as pd
df = pd.DataFrame({‘text’: [‘aaa’, ‘aab’, ‘aac’, ‘aaa’, ‘aab’, ‘aac’, ‘aaa’, ‘aab’, ‘aac’, ‘aaa’],
'numbers': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]},)
source = ColumnDataSource(df)
columns = [ TableColumn(field=df.columns[0], title=df.columns[0]),
TableColumn(field=df.columns[1], title=df.columns[1])]
data_table = DataTable(source=source, columns=columns)
input_text = AutocompleteInput(title=df.columns[1], completions=df.iloc[:,1].unique().tolist())
def update():
if input_text.value == '':
current = df
else:
current = df[(df.iloc[:,1] == input_text.value)]
source.data = {
df.columns[0] : current.iloc[:,0],
df.columns[1] : current.iloc[:,1],
}
input_text.on_change(‘value’, lambda attr, old, new: update())
box = widgetbox([input_text, data_table])
curdoc().add_root(box)
``
I appreciate any help
Thanks
Rafael Pais
plataform: win-64
conda version 4.2.9
bokeh 0.12.6 and bokeh 0.12.7