@@ -1765,10 +1765,12 @@ var Select = (0, _createReactClass2['default'])({
17651765
17661766 var divProps = _objectWithoutProperties ( _props$inputProps , [ 'inputClassName' ] ) ;
17671767
1768+ var _ariaOwns = ( 0 , _classnames2 [ 'default' ] ) ( _defineProperty ( { } , this . _instancePrefix + '-list' , isOpen ) ) ;
1769+
17681770 return _react2 [ 'default' ] . createElement ( 'div' , _extends ( { } , divProps , {
17691771 role : 'combobox' ,
17701772 'aria-expanded' : isOpen ,
1771- 'aria-owns' : isOpen ? this . _instancePrefix + '-list' : this . _instancePrefix + '-value' ,
1773+ 'aria-owns' : _ariaOwns ,
17721774 'aria-activedescendant' : isOpen ? this . _instancePrefix + '-option-' + focusedOptionIndex : this . _instancePrefix + '-value' ,
17731775 className : className ,
17741776 tabIndex : this . props . tabIndex || 0 ,
@@ -1792,7 +1794,8 @@ var Select = (0, _createReactClass2['default'])({
17921794 } ,
17931795
17941796 renderClear : function renderClear ( ) {
1795- if ( ! this . props . clearable || ! this . props . value || this . props . value === 0 || this . props . multi && ! this . props . value . length || this . props . disabled || this . props . isLoading ) return ;
1797+
1798+ if ( ! this . props . clearable || this . props . value === undefined || this . props . value === null || this . props . multi && ! this . props . value . length || this . props . disabled || this . props . isLoading ) return ;
17961799 var clear = this . props . clearRenderer ( ) ;
17971800
17981801 return _react2 [ 'default' ] . createElement (
@@ -1910,11 +1913,12 @@ var Select = (0, _createReactClass2['default'])({
19101913 var options = this . _visibleOptions ;
19111914 if ( ! options . length ) return null ;
19121915
1916+ var valueKey = this . props . valueKey ;
19131917 var focusedOption = this . state . focusedOption || selectedOption ;
19141918 if ( focusedOption && ! focusedOption . disabled ) {
19151919 var focusedOptionIndex = - 1 ;
19161920 options . some ( function ( option , index ) {
1917- var isOptionEqual = option . value === focusedOption . value ;
1921+ var isOptionEqual = option [ valueKey ] === focusedOption [ valueKey ] ;
19181922 if ( isOptionEqual ) {
19191923 focusedOptionIndex = index ;
19201924 }
0 commit comments