@@ -117,7 +117,7 @@ def _validate_options(self, proposal):
117
117
118
118
@observe ('options' )
119
119
def _propagate_options (self , change ):
120
- "Set the values and labels, and unselect any option if we aren't initializing"
120
+ "Set the values and labels, and select the first option if we aren't initializing"
121
121
options = self ._options_full
122
122
self .set_trait ('_options_labels' , tuple (i [0 ] for i in options ))
123
123
self ._options_values = tuple (i [1 ] for i in options )
@@ -374,7 +374,7 @@ def _validate_options(self, proposal):
374
374
return proposal .value
375
375
376
376
class _MultipleSelectionNonempty (_MultipleSelection ):
377
- """Selection that is guaranteed to have a value selected ."""
377
+ """Selection that is guaranteed to have an option available ."""
378
378
379
379
def __init__ (self , * args , ** kwargs ):
380
380
if len (kwargs .get ('options' , ())) == 0 :
@@ -417,11 +417,12 @@ class SelectionRangeSlider(_MultipleSelectionNonempty):
417
417
418
418
@observe ('options' )
419
419
def _propagate_options (self , change ):
420
- "Unselect any option"
420
+ "Select the first range"
421
+ options = self ._options_full
422
+ self .set_trait ('_options_labels' , tuple (i [0 ] for i in options ))
423
+ self ._options_values = tuple (i [1 ] for i in options )
421
424
if self ._initializing_traits_ is not True :
422
425
self .index = (0 , 0 )
423
- self .set_trait ('_options_labels' , tuple (i [0 ] for i in change .new ))
424
- self ._options_values = tuple (i [1 ] for i in change .new )
425
426
426
427
@validate ('index' )
427
428
def _validate_index (self , proposal ):
0 commit comments