File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ export default class Autosuggest extends Component {
107107 } ;
108108
109109 this . justPressedUpDown = false ;
110+ this . justMouseEntered = false ;
110111 }
111112
112113 componentDidMount ( ) {
@@ -121,7 +122,8 @@ export default class Autosuggest extends Component {
121122 if (
122123 nextProps . highlightFirstSuggestion &&
123124 nextProps . suggestions . length > 0 &&
124- this . justPressedUpDown === false
125+ this . justPressedUpDown === false &&
126+ this . justMouseEntered === false
125127 ) {
126128 this . highlightFirstSuggestion ( ) ;
127129 }
@@ -318,6 +320,12 @@ export default class Autosuggest extends Component {
318320
319321 onSuggestionMouseEnter = ( event , { sectionIndex, itemIndex } ) => {
320322 this . updateHighlightedSuggestion ( sectionIndex , itemIndex ) ;
323+
324+ this . justMouseEntered = true ;
325+
326+ setTimeout ( ( ) => {
327+ this . justMouseEntered = false ;
328+ } ) ;
321329 } ;
322330
323331 highlightFirstSuggestion = ( ) => {
You can’t perform that action at this time.
0 commit comments