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

Warning: Failed prop type: Invalid prop onRef of type object supplied to Input, expected function. #245

Open
sajiff opened this issue Aug 22, 2021 · 2 comments

Comments

@sajiff
Copy link

sajiff commented Aug 22, 2021

I am trying to pass on ref of an input so that i can go to one input to another through the keyboard next button. but whenever i am passing the ref with onRef i get this warning.
I am providing screenshots of both the error and the code that is causing it

Capture1

Capture

Screenshot_1629653157

NOTE:- I dont know if its a solution or not but i have changed a code inside node_modules->galio framework's input.js and the warning is gone and the code works but i know thats not a solution.

@viralpatel79
Copy link

in "src" -> "atomic" -> "atoms" -> Input.js file on line 163 replacing onRef: PropTypes.func, with onRef: PropTypes.any, fixes the issue. onRef field should be a value not a function.

It would be nice if someone can make this change and fix this warning.

@timbabs1
Copy link

timbabs1 commented Oct 12, 2022

Yes correct the proptype for onRef should be object or any

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

3 participants