Disable auto focus for option #5447
Replies: 10 comments 7 replies
-
In this code line https://github.com/JedWatson/react-select/blob/master/src/Select.js#L458, look like |
Beta Was this translation helpful? Give feedback.
-
Anyone found a solution for this? |
Beta Was this translation helpful? Give feedback.
-
Hello, @JedWatson |
Beta Was this translation helpful? Give feedback.
-
While it would be great for this PR to be merged, I believe I managed to accomplish this with the following hackery: onInputChange={(value: string) =>{ this.selectRef.select.getNextFocusedOption = ()=>null; }} There is no longer any default selection, but arrow keying still works. I then also bind to onKeyDown to intercept submission from input and fire submission callback with text directly from input. |
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
-
This will be resolved when #4080 is merged. |
Beta Was this translation helpful? Give feedback.
-
@khawerrind, quick question, are you planning to merge this pr at some point? |
Beta Was this translation helpful? Give feedback.
-
is there a fix for this yet? this pr has not been merged yet |
Beta Was this translation helpful? Give feedback.
-
Hi! any update on this? This is a must-have functionality, kindly merge the above PR. Does any one have any solution to this? |
Beta Was this translation helpful? Give feedback.
-
Hi everyone. Any updates about this? After all these years I see that PRs connected to preventing auto-focusing on first option are still opened or closed. None of them merged. So there is no built-in prop\solution to prevent this auto-focusing? |
Beta Was this translation helpful? Give feedback.
-
First of all thank you for the great library.
I wanted to ask if there is any option to not select any option by default? I want the option to be selected only when user use arrow keys or click on an option using mouse.
Beta Was this translation helpful? Give feedback.
All reactions