How to choose specifc countries only?
kamal-hossain opened this issue ยท 9 comments
I want to select specifc countries only and remove the rest. Is there any prop or method available for that?
Can you describe little bit more
Please look in new version of lib. 1.4.0
appreciate your work, working like a champ! @GeorgeHop
@kamal-hossain @GeorgeHop Could you please elaborate more on how did you achieve this? I could see there are more than 50 countries being listed right now in the picker but I want only 10 countries to be shown to the user. excludedCountries
prop can be used here but how do I get the list of country codes.
I think it will be better if we can get a new prop includeCountries
so that it will easy to implement than excludedCountries
I will re-open issue to track it easier!
So please may you add a little description about feature you want?!
How I understand you want to be added some prop similar to excludeCountries? In case you wan't to show few countries only... For example we can add something like that showOnly={['ua', 'pl']}
or we can create some special rule for excludeCountries prop to allow you configure which countries to show like here excludedCountriesConfig={{...someConfigStructureHere}}
where you will define options for countries array.
Ready! Preparing new update
Check version 2.3.0 and docs for sure to properly use everything)
@GeorgeHop That was so quick. Thanks for the update. showOnly
prop is what I was expecting because the picker shows around 250 countries. So when the user wants to show only 10 countries then they can use showOnly
prop and pass the country code array. This is a much easier implementation for the user rather than the excludedCountries
prop.
Also, Readme doc is updated fine but can you also update the releases section in the repo.