Repository: bokeh/bokeh

Issue:
Default value in dropdown menu is stuck on None
## Expected behavior

The default value for a dropdown menu should be the first item in the menu, or otherwise specified. So when a new session is started and another widget - say a slider - is changed, the dropdown should return the default value if the user hasn't selected anything from it yet.
## Problem 

However, my dropdowns all return None until the user selects something from the menu. This is happening whether or not I specify default_value for the dropdown.

Here's an example. Updating the slider value causes dropdown to return None, until you pick something from it's menu

```
from bokeh.io import curdoc
from bokeh.layouts import layout, widgetbox
from bokeh.models.widgets import Dropdown, Slider

#set up widgets
slidy = Slider(title = 'slider', value = 1, start = 1, end = 3, step = 1)
menu = [('1', 'one'), ('2', 'two'), ('3', 'three')]
droppy = Dropdown(name = 'dropdown', menu = menu, default_value = 'one')
w = widgetbox(slidy, droppy)

#set up callbacks
def update_data(attrname, old, new):
    number = slidy.value
    name = droppy.value
    print(number)
    print(name)

slidy.on_change('value', update_data)
droppy.on_change('value', update_data)

#add to document
curdoc().add_root(w)
```

Is dropdown not working like expected, or am I missing something?

Edit: running version 12.1



Discussion:
It's `value`, not `default_value`. I am actually surprised that does not throw a python exception. Can you point to some place where you saw `default_value` used?

This perhaps:

https://github.com/bokeh/bokeh/blob/master/bokeh/models/widgets/buttons.py#L117-L123

@mattpap do you have any thoughts? This seems pretty muddled, I guess the real solution is to create proper events for things like buttons. This `value` / `default_value` seems confusing (in addition to broken?)

@bryevdv Yeah, I looked it up in the Reference: 

http://bokeh.pydata.org/en/latest/docs/reference/models/widgets.buttons.html#bokeh.models.widgets.buttons.Dropdown

Would `value` work for specifying what the Dropdown should return if nothing has been selected yet? (Sorry, not at my machine to test it right now)

Ok `value` works; it does what I thought `default_value` would. And `default_value` doesn't do anything as far as I can tell.

ping @mattpap for comments. can we just get rid of `default_value`? 
Can confirm `default_value` is still broken as of `0.12.10` dev master. I think it should just be removed. cc @mattpap 
OK this does seem to now have a function, tho it seems a bit obscure and strange to me. When not set, a dropdown like this is rendered:

<img width="273" alt="screen shot 2018-05-08 at 15 00 18" src="https://user-images.githubusercontent.com/1078448/39785321-8df7cd40-52d0-11e8-9bd1-ff1dc4b9e439.png">

When a `default_value` is set, a "split" dropdown button is rendered:

<img width="193" alt="screen shot 2018-05-08 at 15 00 01" src="https://user-images.githubusercontent.com/1078448/39785337-9c7bb462-52d0-11e8-899e-12a5aa57b9c0.png">

And further, clicking the Button on top updates the dropdown value to the default. 

I guess could be useful? But the docs should be updated to reflect this actual usage.  


Resolving patch:
diff --git a/bokeh/models/widgets/buttons.py b/bokeh/models/widgets/buttons.py
--- a/bokeh/models/widgets/buttons.py
+++ b/bokeh/models/widgets/buttons.py
@@ -107,7 +107,10 @@ class Dropdown(AbstractButton):
     """)
 
     default_value = String(help="""
-    The default value, otherwise the first item in ``menu`` will be used.
+    A default value to set when a split Dropdown's top button is clicked.
+
+    Setting this property will cause the Dropdown to be rendered as
+    split.
     """)
 
     menu = List(Tuple(String, String), help="""


Test patch: