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:
Add property to enable/disable specify countries by isoCountryCode or CallingCode
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:
Rename countryCodes to defaultCountryCodes (the country codes array)
Add a property countryCodes: Country[] to CountryPickerProps
Modify countryCode related function to use
const countryCodes: Country[] = this.props.countryCodes || defaultCountryCodes
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:
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:
countryCodes
todefaultCountryCodes
(the country codes array)countryCodes: Country[]
toCountryPickerProps
const countryCodes: Country[] = this.props.countryCodes || defaultCountryCodes
Any thoughts?