'React Native Text Input Auto-Fill Email issues

I am using the React Native Text Input but I am having an issue with the iOS autofill feature when I am using the field for an email entry to sign up a user. I get autofill recommendations for names, state, city and country. But not email, I am unsure as to why. Here is the example of our text field/text input components.

Text Field Component

<TextInput {...props} style={props.tall ? styles.tallTextInputStyle : styles.textInputStyle} adjustsFontSizeToFit />

Form Input Component

<TextField
    testID="emailInput"
    placeholder="[email protected]"
    error={errors.email || invalidEmail || duplicate}
    validated={validated.email && !error}
    keyboardType="email-address"
    selectTextOnFocus
    returnKeyType="done"
    autoCapitalize={false}
    onSubmitEditing={formSubmitted}
    onChangeText={(val) => updateEmail(val.trim())}
    autoCompleteType="email"
    textContentType="emailAddress"
/>

I have already added the Associated Domains to the Xcode project and this seemed to make no difference at all.

Any advice on the autofill issues I am going through would be greatly appreciated.



Solution 1:[1]

I had a similar issue and it is appeared to be a problem with KeyboardAvoidingView from 'react-native', so I changed it to KeyboardAwareScrollView from 'react-native-keyboard-aware-scroll-view' and the problem was resolved

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 agnes_st