thegamenicorus / react-native-phone-input

Phone input box for React Native
https://www.npmjs.com/package/react-native-phone-input
MIT License
394 stars 447 forks source link

Can't use onSubmitEditing prop #42

Closed jandrell-formoso closed 6 years ago

jandrell-formoso commented 6 years ago

I can't make the PhoneInput focus on the next TextInput because it's not reading the onSubmitEditing prop that is visible on other react native inputs. Is there any fix to that? or some workaround? Thanks.

cmwendwa commented 6 years ago

Try passing it via textProps,which can be a list of objects that are TextInput props or custom props incase of a custom TextComponent:

 textProps={{ onSubmitEditing : () => { console.log("ON SUBMIT EDITING"); }, }}
jandrell-formoso commented 6 years ago

@clementm916 Thank you! It's working now. 👍 💯