Skip to content

Commit

Permalink
Merge pull request #194 from Shinyaigeek/fix/hooks-useInput-type
Browse files Browse the repository at this point in the history
fix: type of useInput
  • Loading branch information
unix authored May 10, 2020
2 parents 908eda0 + cd68a08 commit 0cbdbae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/input/use-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const useInput = (
reset: () => void
bindings: {
value: string
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void
onChange: (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void
}
} => {
const [state, setState, currentRef] = useCurrentState<string>(initialValue)
Expand All @@ -22,7 +22,7 @@ const useInput = (
reset: () => setState(initialValue),
bindings: {
value: state,
onChange: (event: React.ChangeEvent<HTMLInputElement>) => {
onChange: (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
setState(event.target.value)
},
},
Expand Down

0 comments on commit 0cbdbae

Please sign in to comment.