Skip to content

Commit

Permalink
fix(Select): fix autofocus
Browse files Browse the repository at this point in the history
  • Loading branch information
zouxuoz committed Sep 2, 2019
1 parent 5a6fcc9 commit d6ec455
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/Select/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type SelectProps = {|
hasError?: boolean,
withPortal?: boolean,
menuIsOpen?: boolean,
autoFocus?: boolean,
zIndex?: string | number,
valueComponent?: React$Node,
components?: Object,
Expand Down Expand Up @@ -154,6 +155,7 @@ class Select extends React.Component<SelectProps & SelectPropsFromHOCs> {
inputValue,
onInputChange,
menuIsOpen,
autoFocus,
...rest
} = this.props;

Expand All @@ -174,6 +176,7 @@ class Select extends React.Component<SelectProps & SelectPropsFromHOCs> {
valueComponent={ valueComponent }
styles={ customStyles({ ...rest, COLORS: theme.COLORS || COLORS }) }
value={ selectValue }
autoFocus={ autoFocus }
components={ components }
formatOptionLabel={ formatOptionLabel }
inputValue={ inputValue }
Expand Down

0 comments on commit d6ec455

Please sign in to comment.