Repository: bokeh/bokeh

Issue:
Document when the callback occurs on the  TextInput widget. 
Was with @brevdev working on a plot and had a notion that the TextInput callback happened onchange (i.e. everytime you enter a character) actually it works when you press enter or leave a cell.

Where should we put this kind of documentation? It's not going to be auto-generated.



Discussion:
In the callback help string to start, and then reiterated in an example, ideally. 

Probably missing something obvious as I haven't written docstrings for the autogenerated docs. But TextInput doesn't have a callback docstring as the callback's on the parent....

No, we will just have to not put it on the parent, and instead nstput it on individual classes in order to customize the docstring per-class. 


Resolving patch:
diff --git a/bokeh/models/widgets/inputs.py b/bokeh/models/widgets/inputs.py
--- a/bokeh/models/widgets/inputs.py
+++ b/bokeh/models/widgets/inputs.py
@@ -21,10 +21,6 @@ class InputWidget(Widget):
     Widget's label.
     """)
 
-    callback = Instance(Callback, help="""
-    A callback to run in the browser whenever the input's value changes.
-    """)
-
     @classmethod
     def coerce_value(cls, val):
         prop_obj = cls.lookup('value')
@@ -56,12 +52,17 @@ class TextInput(InputWidget):
     Initial or entered text value.
     """)
 
+    callback = Instance(Callback, help="""
+    A callback to run in the browser whenever the user unfocuses the TextInput
+    widget by hitting Enter or clicking outside of the text box area.
+    """)
+
 class AutocompleteInput(TextInput):
     """ Single-line input widget with auto-completion. """
 
     completions = List(String, help="""
     A list of completion strings. This will be used to guide the
-    user when he types-in a value.
+    user upon typing the beginning of a desired value.
     """)
 
 class Select(InputWidget):
@@ -77,6 +78,11 @@ class Select(InputWidget):
     Initial or selected value.
     """)
 
+    callback = Instance(Callback, help="""
+    A callback to run in the browser whenever the current Select dropdown
+    value changes.
+    """)
+
     @classmethod
     def create(self, *args, **kwargs):
         options = kwargs.pop('options', [])
@@ -101,6 +107,11 @@ class MultiSelect(InputWidget):
     Initial or selected values.
     """)
 
+    callback = Instance(Callback, help="""
+    A callback to run in the browser whenever the current dropdown value
+    changes.
+    """)
+
     @classmethod
     def create(self, *args, **kwargs):
         options = kwargs.pop('options', [])
@@ -137,6 +148,10 @@ class Slider(InputWidget):
     Orient the slider either horizontally (default) or vertically.
     """)
 
+    callback = Instance(Callback, help="""
+    A callback to run in the browser whenever the current Slider value changes.
+    """)
+
 class DateRangeSlider(InputWidget):
     """ Slider-based date range selection widget.
 
@@ -178,6 +193,10 @@ class DateRangeSlider(InputWidget):
     do nothing).
     """)
 
+    callback = Instance(Callback, help="""
+    A callback to run in the browser whenever either slider's value changes.
+    """)
+
 class DatePicker(InputWidget):
     """ Calendar-based date picker widget.
 
@@ -194,3 +213,7 @@ class DatePicker(InputWidget):
     max_date = Date(default=None, help="""
     Optional latest allowable date.
     """)
+
+    callback = Instance(Callback, help="""
+    A callback to run in the browser whenever the current date value changes.
+    """)


Test patch: