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

propTypes warning when RefObject assigned to getInputRef #384

Closed
Reeywhaar opened this issue Feb 3, 2020 · 2 comments
Closed

propTypes warning when RefObject assigned to getInputRef #384

Reeywhaar opened this issue Feb 3, 2020 · 2 comments

Comments

@Reeywhaar
Copy link

When passing refObject (object created either by react.createRef or react.useRef) to getInputRef, propTypes spawn warning:

Warning: Failed prop type: Invalid prop `getInputRef` of type `object` supplied to `NumberFormat`, expected `function`.

Solution is to amend propType to something like described here facebook/prop-types#240

Thank you!

@Reeywhaar Reeywhaar changed the title propTypes warning when RefObject assigned getInputRef propTypes warning when RefObject assigned to getInputRef Feb 3, 2020
s-yadav added a commit that referenced this issue Feb 20, 2020
- Fix type declaration. Added allowLeadingZeros on types. #385
- Fixed #386. Clear the input on blur if ony `-` is added.
- Added prop-type defination for RefObject #384
- Added inputMode = numeric by default so in mobile browser proper keyboard should open. #189, #312
s-yadav added a commit that referenced this issue Feb 20, 2020
- Fix type declaration. Added allowLeadingZeros on types. #385
- Fixed #386. Clear the input on blur if ony `-` is added.
- Added prop-type defination for RefObject #384
- Added inputMode = numeric by default so in mobile browser proper keyboard should open. #189, #312
@s-yadav
Copy link
Owner

s-yadav commented Feb 21, 2020

Fixed.

@s-yadav s-yadav closed this as completed Feb 21, 2020
@Reeywhaar
Copy link
Author

Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants