diff --git a/beakerx/beakerx/easyform/easyform.py b/beakerx/beakerx/easyform/easyform.py index e598b32177..d0fe566df6 100644 --- a/beakerx/beakerx/easyform/easyform.py +++ b/beakerx/beakerx/easyform/easyform.py @@ -80,7 +80,7 @@ def addList(self, *args, **kwargs): list = SelectMultipleSingle( description=self.getDescription(args, kwargs)) list.options = self.getOptions(args, kwargs) - list.size = getValue(kwargs, 'rows', 2) + list.size = getValue(kwargs, 'rows', len(list.options)) self.children += (list,) self.components[list.description] = list diff --git a/js/notebook/src/easyForm/selectMultipleSingleWidget.js b/js/notebook/src/easyForm/selectMultipleSingleWidget.js index 7a5256d04a..814f2666f6 100644 --- a/js/notebook/src/easyForm/selectMultipleSingleWidget.js +++ b/js/notebook/src/easyForm/selectMultipleSingleWidget.js @@ -33,13 +33,13 @@ var SelectMultipleSingleModel = widgets.SelectModel.extend({ var SelectMultipleSingleView = widgets.SelectView.extend({ update: function() { SelectMultipleSingleView.__super__.update.apply(this); - var items = this.model.get('_options_labels'); - if (items && items.length !== undefined) { - $(this.listbox).attr('size', items.length); - $(this.el) - .removeClass('widget-select') - .addClass('widget-select-multiple'); + var size = this.model.get('size'); + if (size !== undefined) { + $(this.listbox).attr('size', size); } + $(this.el) + .removeClass('widget-select') + .addClass('widget-select-multiple'); } });