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

Country options don't work if "countriesData" is passed #402

Open
anetecima opened this issue Jul 7, 2022 · 1 comment
Open

Country options don't work if "countriesData" is passed #402

anetecima opened this issue Jul 7, 2022 · 1 comment

Comments

@anetecima
Copy link

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

Screenshot (498)
can be checked here - https://codesandbox.io/s/nervous-dust-nwh12t?file=/src/App.js

@anetecima
Copy link
Author

anetecima commented Jul 8, 2022

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.

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

1 participant