@@ -1108,15 +1108,15 @@ var Select = (0, _createReactClass2['default'])({
11081108 } ) ;
11091109 } ,
11101110
1111- getFocusableOptionIndex : function getFocusableOptionIndex ( selectedOption ) {
1111+ getFocusableOptionIndex : function getFocusableOptionIndex ( selectedOption , valueKey ) {
11121112 var options = this . _visibleOptions ;
11131113 if ( ! options . length ) return null ;
11141114
11151115 var focusedOption = this . state . focusedOption || selectedOption ;
11161116 if ( focusedOption && ! focusedOption . disabled ) {
11171117 var focusedOptionIndex = - 1 ;
11181118 options . some ( function ( option , index ) {
1119- var isOptionEqual = option . value === focusedOption . value ;
1119+ var isOptionEqual = option [ valueKey ] === focusedOption [ valueKey ] ;
11201120 if ( isOptionEqual ) {
11211121 focusedOptionIndex = index ;
11221122 }
@@ -1166,7 +1166,7 @@ var Select = (0, _createReactClass2['default'])({
11661166 var options = this . _visibleOptions = this . filterOptions ( this . props . multi ? this . getValueArray ( this . props . value ) : null ) ;
11671167 var isOpen = this . state . isOpen ;
11681168 if ( this . props . multi && ! options . length && valueArray . length && ! this . state . inputValue ) isOpen = false ;
1169- var focusedOptionIndex = this . getFocusableOptionIndex ( valueArray [ 0 ] ) ;
1169+ var focusedOptionIndex = this . getFocusableOptionIndex ( valueArray [ 0 ] , this . props . valueKey ) ;
11701170
11711171 var focusedOption = null ;
11721172 if ( focusedOptionIndex !== null ) {
@@ -1235,4 +1235,4 @@ var Select = (0, _createReactClass2['default'])({
12351235} ) ;
12361236
12371237exports [ 'default' ] = Select ;
1238- module . exports = exports [ 'default' ] ;
1238+ module . exports = exports [ 'default' ] ;
0 commit comments