thegamenicorus / react-native-phone-input

Phone input box for React Native
https://www.npmjs.com/package/react-native-phone-input
MIT License
395 stars 450 forks source link

Limit country list to one of several countries? #16

Closed arrkaye closed 6 years ago

arrkaye commented 7 years ago

I don't need the entire list..

Is it possible to pass in an array of countries to show in the picker? E.g. us, gb, fr

HasanAlyazidi commented 6 years ago

Check out my fork: Custom countries

thegamenicorus commented 6 years ago

Hi @HasanAlyazidi ,

Thanks for you PR. veryawesome.

HasanAlyazidi commented 6 years ago

My pleasure

affanhashone commented 5 years ago

I am passing array to countries list, app is getting crash

HasanAlyazidi commented 5 years ago

Can you share your code?

affanhashone commented 5 years ago

this.state = { countriesList : ['us'] } <PhoneInput ref={(ref) => { this.phone = ref; }} countriesList = {this.state.countriesList} autoFormat = {true} textStyle = {{color: '#fff',fontSize:scale(13)}} />

Let me know If I am passing anything incorrect?

affanhashone commented 5 years ago

@HasanAlyazidi Thanks Brother for Such a Quick Reply, I figure out, I am passing the Json list to countriesList props. Thanks

ReactCoder12 commented 2 years ago

How can I limit countries to one country Please explain How this possible