We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I invoke onPressFlag(){ this.countryPicker.openModal() } by pressing the country flag, I get undefined. Here is the code below:
`import React, { Component } from 'react'; import { StyleSheet, View } from 'react-native';
import PhoneInput from 'react-native-phone-input'; import CountryPicker from 'react-native-country-picker-modal';
export default class Test4 extends React.Component { constructor() { super();
this.onPressFlag = this.onPressFlag.bind(this); this.selectCountry = this.selectCountry.bind(this); this.state = { cca2: 'US', };
}
componentDidMount() { this.setState({ pickerData: this.phone.getPickerData(), }); }
onPressFlag(){ this.countryPicker.openModal() }
selectCountry(country){ this.phone.selectCountry(country.cca2.toLowerCase()) this.setState({cca2: country.cca2}) }
render(){ return( <PhoneInput ref={(ref) => { this.phone = ref; }} onPressFlag={this.onPressFlag} />
<CountryPicker ref={(ref) => { this.countryPicker = ref; }} onChange={(value)=> this.selectCountry(value)} translation='eng' cca2={this.state.cca2} > <View></View> </CountryPicker> </View> )
} }
let styles = StyleSheet.create({ container: { flex: 1, alignItems: 'center', padding: 20, paddingTop: 60, }, });`
The text was updated successfully, but these errors were encountered:
I have the same issue. please, anyone has the solution?. thanks.
Sorry, something went wrong.
Please refer to this my friend. xcarpentier/react-native-country-picker-modal#270 (comment)
I have the same issue. I am using this with expo application . Please anyone help. Its urgent.
Thanks in andvance
No branches or pull requests
When I invoke onPressFlag(){ this.countryPicker.openModal() } by pressing the country flag, I get undefined. Here is the code below:
`import React, { Component } from 'react';
import { StyleSheet, View } from 'react-native';
import PhoneInput from 'react-native-phone-input';
import CountryPicker from 'react-native-country-picker-modal';
export default class Test4 extends React.Component {
constructor() {
super();
}
componentDidMount() {
this.setState({
pickerData: this.phone.getPickerData(),
});
}
onPressFlag(){
this.countryPicker.openModal()
}
selectCountry(country){
this.phone.selectCountry(country.cca2.toLowerCase())
this.setState({cca2: country.cca2})
}
render(){
return(
<PhoneInput
ref={(ref) => { this.phone = ref; }}
onPressFlag={this.onPressFlag}
/>
}
}
let styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
padding: 20,
paddingTop: 60,
},
});`
The text was updated successfully, but these errors were encountered: