oursky / react-native-oursky

MIT License
2 stars 9 forks source link

Customize country codes of CountryPicker #46

Open jhihruei opened 5 years ago

jhihruei commented 5 years ago

Sometimes we will not support all of the countries. I would like to make options of country list could be customized, I think we can do:

  1. Add property to enable/disable specify countries by isoCountryCode or CallingCode
  2. Add property to override default country codes

In my opinion, I prefer to override default country codes. I think enable/disable specify countries will be a bit complex for the setting, override default country codes could be more flexible and easier to use.

So I would like to do:

Any thoughts?

louischan-oursky commented 5 years ago

Agree with you that the second option is better.

The new prop countryCodes should be a default prop with the default value defaultCountryCodes.

Looking forwarding to seeing your contribution!