Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: type of useInput #194

Merged
merged 1 commit into from
May 10, 2020
Merged

Conversation

Shinyaigeek
Copy link
Contributor

@Shinyaigeek Shinyaigeek commented May 10, 2020

PR Checklist

  • Fix linting errors
  • Label has been added

Change information

Thanks for nice library!!

I fixed type of useInput 's arg.
I think we should be able use useInput also in Textarea component, and docs introduces use-case for using useInput in Textarea https://react.zeit-ui.co/en-us/components/textarea#with-useinput

But bindings.onChange which is returned by useInput can only handle HTMLInputElement, so TypeScript throw type errors when I use useInput in Textarea component.
I fixed it.

@codecov
Copy link

codecov bot commented May 10, 2020

Codecov Report

Merging #194 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #194   +/-   ##
=======================================
  Coverage   99.90%   99.90%           
=======================================
  Files         167      167           
  Lines        2069     2069           
  Branches      468      485   +17     
=======================================
  Hits         2067     2067           
  Misses          2        2           
Impacted Files Coverage Δ
components/input/use-input.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 908eda0...cd68a08. Read the comment docs.

Copy link
Member

@unix unix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! ❤️

@unix unix added the type: bug Something isn't working label May 10, 2020
@unix unix merged commit 0cbdbae into geist-org:master May 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants