We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch react-native-otp-inputs@7.4.0 for the project I'm working on.
react-native-otp-inputs@7.4.0
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-otp-inputs/src/index.tsx b/node_modules/react-native-otp-inputs/src/index.tsx index 7fd9e45..16a7b5f 100644 --- a/node_modules/react-native-otp-inputs/src/index.tsx +++ b/node_modules/react-native-otp-inputs/src/index.tsx @@ -20,6 +20,7 @@ import { TextStyle, View, ViewStyle, + } from 'react-native'; import { fillOtpCode } from './helpers'; @@ -39,6 +40,7 @@ type Props = TextInputProps & { defaultValue?: string; handleChange: (otpCode: string) => void; inputContainerStyles?: StyleProp<ViewStyle>; + containerComponent?: React.ComponentType<any>; inputStyles?: StyleProp<TextStyle>; isRTL?: boolean; numberOfInputs: number; @@ -75,6 +77,7 @@ const OtpInputs = forwardRef<OtpInputsRef, Props>( selectTextOnFocus = true, style, testIDPrefix = 'otpInput', + containerComponent: ContainerComponent = React.Fragment, ...restProps }, ref, @@ -244,7 +247,8 @@ const OtpInputs = forwardRef<OtpInputsRef, Props>( } return ( - <OtpInput + <ContainerComponent> + <OtpInput accessible accessibilityLabel={`${testIDPrefix}-${inputIndex}`} autoCapitalize={autoCapitalize} @@ -272,7 +276,8 @@ const OtpInputs = forwardRef<OtpInputsRef, Props>( selectTextOnFocus={selectTextOnFocus} testID={`${testIDPrefix}-${inputIndex}`} {...restProps} - /> + /></ContainerComponent> + ); }); };
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
react-native-otp-inputs@7.4.0
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: