You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a custom input with a wrapper to do styling and wrapped it with React.forwardRef to get access to the ref and pass it down to the input inside the wrapper.
Everything is working fine, but I get an warning in the console: Warning: Failed prop type: Invalid prop `inputComponent` of type `object` supplied to `PhoneNumberInput`, expected `function`. because React.forwardRef returns an object.
So I think that the prop types for the inputComponent should be: inputComponent : PropTypes.oneOf([PropTypes.func.isRequired, PropTypes.object.isRequired])
I can send you a PR if you prefer.
The text was updated successfully, but these errors were encountered:
Hi,
I created a custom input with a wrapper to do styling and wrapped it with
React.forwardRef
to get access to the ref and pass it down to theinput
inside the wrapper.Everything is working fine, but I get an warning in the console:
Warning: Failed prop type: Invalid prop `inputComponent` of type `object` supplied to `PhoneNumberInput`, expected `function`.
becauseReact.forwardRef
returns an object.So I think that the prop types for the inputComponent should be:
inputComponent : PropTypes.oneOf([PropTypes.func.isRequired, PropTypes.object.isRequired])
I can send you a PR if you prefer.
The text was updated successfully, but these errors were encountered: