Open felixchan opened 5 years ago
If it helps, I used react-native-country-picker-modal which I found easier to customise, and display that in onPressFlag
. In the country picker's onChange
, I call this.phoneInput.selectCountry(country.cca2.toLowerCase()
to set the country on the phone input. Works well for me.
@ncuthbert I am getting this "undefined is not an object (evaluating '_this.countryPicker.openModal')" while using react-native-country-picker-modal?
componentDidMount() { this.asyncLoadLastPhone(); this.setState({ pickerData: this.phone.getPickerData(), }); }
onPressFlag = () => { this.countryPicker.openModal(); };
selectCountry = (country: any) => { this.phone.selectCountry(country.cca2.toLowerCase()); this.setState({cca2: country.cca2}); };
@m4manjesh looks like there is a ticket open for the issue you describe. Seeing as it's come up recently for a number of people, it may be related to a recent version and I'd suggest downgrading, if possible.
@ncuthbert Thanks for the response. Which version you are using?
Seems that it only fills 1/3 of the screen. Is there any way to customize the height of the scroll picker?