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

scrollToIndex should be used in conjunction with getItemLayout or onScrollToIndexFailed, otherwise there is no way to know the location of offscreen indices or handle failures.

Open MTajuddin96 opened this issue 6 years ago • 1 comments

Getting this error when index letter is pressed on the right side.

`` const PhoneInputTest=()=>{ let phone = React.createRef() let countryPicker = React.createRef()

const [timezone, setTimeZone] = useState(momentTz.tz.guess()) const [cca2, setcca2] = useState({ cca2: 'US' }) const [phoneNumber, SetPhoneNumber] = useState('')

function onPressFlag() { countryPicker.current.openModal(); } function selectCountry(country) { phone.current.selectCountry(country.cca2.toLowerCase()); setPhoneNumber(+ ${country.callingCode}) setcca2({ cca2: country.cca2 }); }

return( <View style={{ marginLeft: 20, marginRight: 20, borderWidth: 1, borderRadius: 5, borderColor: borderColor, }}> <PhoneInput ref={phone} onPressFlag={onPressFlag} value={phoneNumber} /> <CountryPicker ref={countryPicker} onChange={value => selectCountry(value)} translation="eng" cca2={cca2.cca2} > <View /> </CountryPicker> </View> ) } ``

MTajuddin96 avatar Jul 25 '19 10:07 MTajuddin96

Any update ?

khushbuthakur avatar Sep 19 '19 09:09 khushbuthakur