Skip to content

Commit 7333885

Browse files
committed
Fix options initialization logic for selection widgets
1 parent 52f05cb commit 7333885

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ipywidgets/widgets/widget_selection.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ def __init__(self, *args, **kwargs):
166166

167167
# Select the first item by default, if we can
168168
if 'index' not in kwargs and 'value' not in kwargs and 'label' not in kwargs:
169+
options = self._options_full
169170
nonempty = (len(options) > 0)
170171
kwargs['index'] = 0 if nonempty else None
171172
kwargs['label'], kwargs['value'] = options[0] if nonempty else (None, None)

0 commit comments

Comments
 (0)