react-native-otp-entry icon indicating copy to clipboard operation
react-native-otp-entry copied to clipboard

Autofill and Auto-detect not working

Open IshmeetSingh06 opened this issue 7 months ago • 0 comments

Describe the bug I have implemented the input component from the package but is not autofilling on both IOS and android, and autodetect otp is not working on android

 <OtpInput
            autoFocus
            blurOnFilled
            numberOfDigits={otpLength}
            focusStickBlinkingDuration={500}
            focusColor={theme.primary}
            type="numeric"
            onTextChange={onChange}
            onFilled={onProceed}
            textInputProps={{
                keyboardType: "number-pad",
                accessibilityLabel: "One-Time Password",
                autoComplete: "sms-otp",
                textContentType: "oneTimeCode",
            }}
            textProps={{
                accessibilityRole: "text",
                accessibilityLabel: "OTP digit",
                allowFontScaling: false,
                style: {
                    fontSize: theme["text-body-1-regular-font-size"],
                    fontFamily: theme["text-body-1-regular-font-family"],
                    lineHeight: theme["text-body-1-regular-line-height"],
                    letterSpacing: theme["text-body-1-regular-letter-spacing"],
                },
            }}
            theme={{
                containerStyle: styles.container,
                pinCodeContainerStyle: {
                    ...styles.pinCodeContainer,
                    borderColor: theme.border_Secondary,
                    backgroundColor: theme.background_Primary,
                },
                filledPinCodeContainerStyle: {
                    borderColor: hasError ? theme.negative : theme.primary,
                },
                focusStickStyle: styles.focusStick,
            }}
        />

Expected behavior It should auto detect and autofill the OTP input

Environment (please complete the following information):

  • OS: Android/IOS
  • Device OS: Android/IOS
  • Library version: 1.8.4

IshmeetSingh06 avatar Apr 30 '25 18:04 IshmeetSingh06