Repository: bokeh/bokeh

Issue:
Bug: DataTable View doesn't rerender on table.source.change.emit()
DataTable View doesn't rerender on table.source.change.emit()

Is currently:
```
this.connect(this.model.source.properties.data.change, () => this.updateGrid());
```

Should be:
```
this.connect(this.model.source.change, () => this.updateGrid());
```

Warning - I hand-modified the BokehJS source and making this change appeared to dramatically hurt render performance. I would take care to check that this problem isn't introduced by a PR.

To reproduce (the right table should updated after a selection on the left-side plot:

```
from random import random

from bokeh.layouts import row
from bokeh.models import CustomJS, ColumnDataSource
from bokeh.plotting import figure, output_file, show
from bokeh.models.widgets import DataTable, TableColumn

output_file("test.html")

x = [random() for x in range(500)]
y = [random() for y in range(500)]

s1 = ColumnDataSource(data=dict(x=x, y=y))
p1 = figure(plot_width=400, plot_height=400, tools="lasso_select, box_select", title="Select Here")
p1.circle('x', 'y', source=s1, alpha=0.6)

s2 = ColumnDataSource(data=dict(x=[], y=[]))
p2 = figure(plot_width=400, plot_height=400, x_range=(0, 1), y_range=(0, 1),
tools="", title="Watch Here")
p2.circle('x', 'y', source=s2, alpha=0.6)

columns = [TableColumn(field="x", title="X"),
TableColumn(field="y", title="Y"), ]
dt = DataTable(source=s2, width=400, height=280, columns=columns)

s1.callback = CustomJS(args=dict(s2=s2), code="""
var inds = cb_obj.selected['1d'].indices;
var d1 = cb_obj.data;
var d2 = s2.data;
d2['x'] = []
d2['y'] = []
for (i = 0; i < inds.length; i++) {
d2['x'].push(d1['x'][inds[i]])
d2['y'].push(d1['y'][inds[i]])
}
# s2.properties.data.change.emit(); # causes table update
s2.change.emit(); # doesn't update table
""")

layout = row(p1, p2, dt)

show(layout)
```


Discussion:
> Warning - I hand-modified the BokehJS source and making this change appeared to dramatically hurt render performance. I would take care to check that this problem isn't introduced by a PR.

@canavandl can you clarify this statement? I'm not sure if you mean the change should or should not be made. 

Resolving patch:
diff --git a/bokeh/models/tools.py b/bokeh/models/tools.py
--- a/bokeh/models/tools.py
+++ b/bokeh/models/tools.py
@@ -950,16 +950,22 @@ class PointDrawTool(EditTool, Drag, Tap):
     ''' *toolbar icon*: |point_draw_icon|
 
     The PointDrawTool allows adding, dragging and deleting point-like
-    glyphs (of ``XYGlyph`` type) on one or more renderers by editing
-    the underlying ``ColumnDataSource`` data. Like other drawing
-    tools, the renderers that are to be edited must be supplied
-    explicitly as a list. Any newly added points will be inserted on
-    the ``ColumnDataSource`` of the first supplied renderer.
+    glyphs (of ``XYGlyph`` type) on one or more renderers by editing the
+    underlying ``ColumnDataSource`` data. Like other drawing tools, the
+    renderers that are to be edited must be supplied explicitly as a list.
+    Any newly added points will be inserted on the ``ColumnDataSource`` of
+    the first supplied renderer.
 
     The tool will automatically modify the columns on the data source
-    corresponding to the ``x`` and ``y`` values of the glyph. Any
-    additional columns in the data source will be padded with the
-    declared ``empty_value``, when adding a new point.
+    corresponding to the ``x`` and ``y`` values of the glyph. Any additional
+    columns in the data source will be padded with the given ``empty_value``
+    when adding a new point.
+
+    .. note::
+        The data source updates will trigger data change events continuously
+        throughout the edit operations on the BokehJS side. In Bokeh server
+        apps, the data source will only be synced once, when the edit operation
+        finishes.
 
     The supported actions include:
 


Test patch: