Skip to content

Commit

Permalink
fix: Except autoFocus from input
Browse files Browse the repository at this point in the history
  • Loading branch information
nabeliwo committed Nov 1, 2019
1 parent be9de17 commit b3b7065
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/Input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ export type Props = React.InputHTMLAttributes<HTMLInputElement> & {
autoFocus?: boolean
}

const InputComponent: React.FC<Props & InjectedProps> = props => {
const InputComponent: React.FC<Props & InjectedProps> = ({ autoFocus, ...props }) => {
const ref = React.useRef<HTMLInputElement>(null)
const { autoFocus } = props

React.useEffect(() => {
if (autoFocus && ref && ref.current) {
Expand Down

0 comments on commit b3b7065

Please sign in to comment.