catamphetamine / react-phone-number-input

React component for international phone number input
http://catamphetamine.gitlab.io/react-phone-number-input/
MIT License
915 stars 193 forks source link

fix: react-native PhoneInput props "metadata" is not required #428

Closed ChrisJamesC closed 10 months ago

ChrisJamesC commented 10 months ago

When using the library, the following warning is displayed in react-native:

Warning: Failed prop type: The prop `metadata` is marked as required in `ForwardRef(PhoneInput)`, but its value is `undefined`.
    at PhoneInput

The metadata prop is set by default to defaultMetadata

catamphetamine commented 10 months ago

I dunno why does it show .isRequired in that file. I don't see that in the source files of the project. The main repo is at gitlab btw.

catamphetamine commented 10 months ago

Thx, merged: https://gitlab.com/catamphetamine/react-phone-number-input/-/commit/5956e2bef03de3d511637e209311a00bdad5b1b9