DataTables set with `editable=True` aren't editable. Bug is reproducible on `exa…mples\models\widgets_server.py`, running on a server (modified version is posted below). Also, `BooleanFormatter` and `CheckboxEditor` are non-functional. Checked in `0.12.0rc1` on both Chrome/Safari.
The JS Console throws the following when double-clicking on a cell within the `DataTable`.
```
bokeh.min.js?v=e356af6…:11 Uncaught TypeError: Cannot read property 'id' of undefined
e.initialize @ bokeh.min.js?v=e356af6…:11
e.initialize @ bokeh-widgets.min.js?v=c2fc412…:1
e.View @ bokeh.min.js?v=e356af6…:22
e @ bokeh.min.js?v=e356af6…:3
e @ bokeh.min.js?v=e356af6…:11
e @ bokeh-widgets.min.js?v=c2fc412…:3
e @ bokeh-widgets.min.js?v=c2fc412…:1
e @ bokeh-widgets.min.js?v=c2fc412…:1
makeActiveCellEditable @ bokeh-widgets.min.js?v=c2fc412…:177
setActiveCellInternal @ bokeh-widgets.min.js?v=c2fc412…:177
gotoCell @ bokeh-widgets.min.js?v=c2fc412…:177
handleDblClick @ bokeh-widgets.min.js?v=c2fc412…:177
dispatch @ bokeh.min.js?v=e356af6…:65
o.dispatch @ bokeh-widgets.min.js?v=c2fc412…:171
m.handle @ bokeh.min.js?v=e356af6…:64
```
Widget Server code
```
from __future__ import print_function
from datetime import date
from random import randint
from bokeh.client import push_session
from bokeh.document import Document
from bokeh.models.glyphs import Line, Circle
from bokeh.models import (
Plot, ColumnDataSource, DataRange1d,
LinearAxis, DatetimeAxis, Grid, HoverTool
)
from bokeh.plotting import curdoc
from bokeh.models.widgets import (
Button, TableColumn, DataTable,
DateEditor, DateFormatter, IntEditor, CheckboxEditor, BooleanFormatter)
from bokeh.models.layouts import VBox
# document = Document()
# session = push_session(document)
def make_data():
n = randint(5, 10)
return dict(
dates=[ date(2014, 3, i+1) for i in range(n) ],
downloads=[ randint(0, 100) for i in range(n) ],
awesome=[ bool(randint(0,1)) for i in range(n) ],
)
source = ColumnDataSource(make_data())
def make_plot():
xdr = DataRange1d()
ydr = DataRange1d()
plot = Plot(title="Product downloads", x_range=xdr, y_range=ydr, plot_width=400, plot_height=400)
line = Line(x="dates", y="downloads", line_color="blue")
plot.add_glyph(source, line)
circle = Circle(x="dates", y="downloads", fill_color="red")
plot.add_glyph(source, circle)
xaxis = DatetimeAxis()
plot.add_layout(xaxis, 'below')
yaxis = LinearAxis()
plot.add_layout(yaxis, 'left')
plot.add_layout(Grid(dimension=0, ticker=xaxis.ticker))
plot.add_layout(Grid(dimension=1, ticker=yaxis.ticker))
plot.add_tools(HoverTool(tooltips=dict(downloads="@downloads")))
return plot, source
def click_handler():
source.data = make_data()
def make_layout():
plot, source = make_plot()
columns = [
TableColumn(field="dates", title="Date", editor=DateEditor(), formatter=DateFormatter()),
TableColumn(field="downloads", title="Downloads", editor=IntEditor()),
TableColumn(field="awesome", title="Bool", editor=CheckboxEditor(),
formatter=BooleanFormatter(icon="check-square")),
]
data_table = DataTable(source=source, columns=columns, width=400, height=400, editable=True, selectable=True)
button = Button(label="Randomize data", button_type="success")
button.on_click(click_handler)
buttons = VBox(children=[button])
vbox = VBox(children=[buttons, plot, data_table])
return vbox
layout = make_layout()
curdoc().add_root(layout)
```