react-native-phone-input icon indicating copy to clipboard operation
react-native-phone-input copied to clipboard

Cannot read property 'open' of undefined

Open michaelVictoriaDev opened this issue 6 years ago • 1 comments

When I hit the function in the example

	onPressFlag() {
		this.myCountryPicker.open()
	}

it says

michaelVictoriaDev avatar Dec 21 '18 00:12 michaelVictoriaDev

@michaelVictoriaDev change your function from onPressFlag() { this.myCountryPicker.open() } to onPressFlag = () => { this.myCountryPicker.open(); } Actually this is binding issue

mtahir08 avatar Apr 24 '19 09:04 mtahir08