Skip to content

Commit

Permalink
feat: add textContentType prop as otp to TextInput
Browse files Browse the repository at this point in the history
  • Loading branch information
anday013 committed Jan 6, 2024
1 parent 7db6d76 commit 6cb3341
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dist/src/OtpInput/OtpInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ exports.OtpInput = (0, react_1.forwardRef)((props, ref) => {
</react_native_1.Pressable>);
})}
</react_native_1.View>
<react_native_1.TextInput value={text} onChangeText={handleTextChange} maxLength={numberOfDigits} inputMode="numeric" ref={inputRef} autoFocus={autoFocus} style={OtpInput_styles_1.styles.hiddenInput} secureTextEntry={secureTextEntry} testID="otp-input-hidden"/>
<react_native_1.TextInput value={text} onChangeText={handleTextChange} maxLength={numberOfDigits} inputMode="numeric" textContentType="oneTimeCode" ref={inputRef} autoFocus={autoFocus} style={OtpInput_styles_1.styles.hiddenInput} secureTextEntry={secureTextEntry} testID="otp-input-hidden"/>
</react_native_1.View>);
});
1 change: 1 addition & 0 deletions src/OtpInput/OtpInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export const OtpInput = forwardRef<OtpInputRef, OtpInputProps>((props, ref) => {
onChangeText={handleTextChange}
maxLength={numberOfDigits}
inputMode="numeric"
textContentType="oneTimeCode"
ref={inputRef}
autoFocus={autoFocus}
style={styles.hiddenInput}
Expand Down

0 comments on commit 6cb3341

Please sign in to comment.