garganurag893 / react-native-phone-number-input

React Native component for phone number.
MIT License
372 stars 212 forks source link

focus method with ref not working #155

Open gunjankumar58 opened 6 months ago

gunjankumar58 commented 6 months ago

phoneInput?.current?.focus();

<PhoneInput ref={phoneInput} defaultValue={value} defaultCode="DM" layout="first" onChangeText={(text) => { setValue(text); }} onChangeFormattedText={(text) => { setFormattedValue(text); }} withDarkTheme withShadow autoFocus />

Error: TypeError: _phoneInput$curre.focus is not a function

mmathijs214 commented 1 month ago

+1 Still not working