React Native Expo - iOS autofill password pops up on signup screen and if you select "Choose my own password" it clears but the state does not

Viewed 82

I'm using Formik and Yup for my auth flow components. Currently, I'm running into an issue where my iOS device pops open the suggested password dialogue and if you select the option to choose your own password it clears but doesn't clear the state.

Here is a video I made of this behavior:

enter image description here

Here is the code for the Formik and Yup.

               <View style={styles.inputFieldContainer}>
                  <CustomText size={14}>Password</CustomText>
                  <View style={styles.inputField}>
                    <TextInput
                      autoCapitalize='none'
                      autoCorrect={false}
                      blurOnSubmit={true}
                      keyboardType='default'
                      maxLength={20}
                      onChangeText={handleChange('password')}
                      ref={passwordRef}
                      secureTextEntry={true}
                      selectionColor={Colors.primary}
                      style={styles.textInput}
                      value={values.password}
                      onSubmitEditing={() => {
                        confirmPasswordRef.current.focus();
                      }}
                    />
                  </View>
                </View>
                <View style={styles.inputFieldContainer}>
                  <CustomText size={14}>Confirm password</CustomText>
                  <View style={styles.inputField}>
                    <TextInput
                      autoCapitalize='none'
                      autoCorrect={false}
                      blurOnSubmit={true}
                      keyboardType='default'
                      maxLength={20}
                      onChangeText={handleChange('confirmPassword')}
                      ref={confirmPasswordRef}
                      secureTextEntry={true}
                      selectionColor={Colors.primary}
                      style={styles.textInput}
                      value={values.confirmPassword}
                      onSubmitEditing={() => {
                        if (allValid) handleSubmit();
                      }}
                    />
                  </View>
              </View>
0 Answers
Related