diff --git a/IPython/html/static/widgets/js/widget_selection.js b/IPython/html/static/widgets/js/widget_selection.js index f00e799..c487834 100644 --- a/IPython/html/static/widgets/js/widget_selection.js +++ b/IPython/html/static/widgets/js/widget_selection.js @@ -5,8 +5,9 @@ define([ "widgets/js/widget", "base/js/utils", "jquery", + "underscore", "bootstrap", -], function(widget, utils, $){ +], function(widget, utils, $, _){ var DropdownView = widget.DOMWidgetView.extend({ render : function(){ @@ -52,19 +53,19 @@ define([ /** * Update the contents of this view * - * Called when the model is changed. The model may have been + * Called when the model is changed. The model may have been * changed by another view or by a state update from the back-end. */ if (options === undefined || options.updated_view != this) { - var selected_item_text = this.model.get('value_name'); + var selected_item_text = this.model.get('selected_label'); if (selected_item_text.trim().length === 0) { this.$droplabel.html(" "); } else { this.$droplabel.text(selected_item_text); } - var items = this.model.get('_value_names'); + var items = this.model.get('_options_labels'); var $replace_droplist = $('