From 9e643f5692efc01aca7260d668b64ed0e0743593 Mon Sep 17 00:00:00 2001 From: Jonathan Frederic Date: Wed, 22 Jan 2014 15:53:58 -0800 Subject: [PATCH] Support multiple types in selection widget. --- .../notebook/js/widgets/widget_selection.js | 26 ++++---- IPython/html/widgets/widget_selection.py | 64 ++++++++++++++++++- 2 files changed, 74 insertions(+), 16 deletions(-) diff --git a/IPython/html/static/notebook/js/widgets/widget_selection.js b/IPython/html/static/notebook/js/widgets/widget_selection.js index 896beda6d..ece7a9a46 100644 --- a/IPython/html/static/notebook/js/widgets/widget_selection.js +++ b/IPython/html/static/notebook/js/widgets/widget_selection.js @@ -57,14 +57,14 @@ define(["notebook/js/widgets/widget"], function(WidgetManager){ // 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'); + var selected_item_text = this.model.get('_value'); if (selected_item_text.length === 0) { this.$droplabel.text(' '); } else { this.$droplabel.text(selected_item_text); } - var items = this.model.get('values'); + var items = this.model.get('_values'); var $replace_droplist = $('