diff --git a/packages/react-select/src/Select.tsx b/packages/react-select/src/Select.tsx index 146d084e20..d2fc5bb257 100644 --- a/packages/react-select/src/Select.tsx +++ b/packages/react-select/src/Select.tsx @@ -92,6 +92,8 @@ export interface Props< ariaLiveMessages?: AriaLiveMessages; /** Focus the control when it is mounted */ autoFocus?: boolean; + /** Focus an option when no inputValue is given */ + autoFocusOption?: boolean; /** Remove the currently focused option when the user presses backspace when Select isClearable or isMulti */ backspaceRemovesValue: boolean; /** Remove focus from the input when the user selects an option (handy for dismissing the keyboard on touch devices) */ @@ -281,6 +283,7 @@ export interface Props< export const defaultProps = { 'aria-live': 'polite', + autoFocusOption: true, backspaceRemovesValue: true, blurInputOnSelect: isTouchCapable(), captureMenuScroll: !isTouchCapable(), @@ -529,11 +532,17 @@ function getNextFocusedOption< Option, IsMulti extends boolean, Group extends GroupBase