react-intl-tel-input
react-intl-tel-input copied to clipboard
Country options don't work if "countriesData" is passed
Country data is undefined if passed through countriesData prop
Expected Behavior
countries should be displayed the same as when the country data isn't passed.
Current Behavior
can be checked here - https://codesandbox.io/s/nervous-dust-nwh12t?file=/src/App.js
the issue is the format that countriesData is expected in.
in documentation it's countriesData?: CountryData[] | null
where countryData is an object while in reality an array is expected for each country. the initialization should be removed if countriesData is passed or the format changed to this - ['Cambodia (កម្ពុជា)', 'kh', '855']
I'd be happy to fix this, but I need permission to push a new branch.