Skip to content

Commit

Permalink
fix: secureTextEntry prop on android
Browse files Browse the repository at this point in the history
  • Loading branch information
kantorm authored and Damian Sznajder committed Jun 29, 2022
1 parent 13b955c commit a42f1d3
Show file tree
Hide file tree
Showing 4 changed files with 4,057 additions and 2,524 deletions.
44 changes: 22 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-otp-inputs",
"version": "7.1.1",
"version": "7.3.0",
"description": "One-time password inputs built in pure JS for React-Native",
"main": "lib/commonjs/index.js",
"module": "lib/module/index.js",
Expand Down Expand Up @@ -32,29 +32,29 @@
"inputs"
],
"devDependencies": {
"@babel/core": "7.15.8",
"@babel/preset-typescript": "7.15.0",
"@commitlint/config-conventional": "13.2.0",
"@react-native-clipboard/clipboard": "1.9.0",
"@babel/core": "7.18.6",
"@babel/preset-typescript": "7.18.6",
"@commitlint/config-conventional": "17.0.3",
"@react-native-clipboard/clipboard": "1.10.0",
"@react-native-community/bob": "0.17.1",
"@release-it/conventional-changelog": "3.3.0",
"@types/jest": "27.0.2",
"@types/react": "17.0.28",
"@types/react-native": "0.65.5",
"commitlint": "13.2.1",
"eslint": "7.23.0",
"eslint-config-satya164": "3.1.10",
"@release-it/conventional-changelog": "5.0.0",
"@types/jest": "28.1.3",
"@types/react": "18.0.14",
"@types/react-native": "0.69.1",
"commitlint": "17.0.3",
"eslint": "8.18.0",
"eslint-config-satya164": "3.1.11",
"eslint-plugin-simple-import-sort": "7.0.0",
"husky": "7.0.2",
"jest": "27.2.5",
"metro-react-native-babel-preset": "0.66.2",
"prettier": "2.4.1",
"react": "17.0.2",
"react-native": "0.66.0",
"react-native-builder-bob": "0.18.2",
"react-test-renderer": "17.0.2",
"release-it": "14.11.6",
"typescript": "4.4.3"
"husky": "8.0.1",
"jest": "28.1.2",
"metro-react-native-babel-preset": "0.71.2",
"prettier": "2.7.1",
"react": "~17.0.2",
"react-native": "0.69.1",
"react-native-builder-bob": "0.18.3",
"react-test-renderer": "~17.0.2",
"release-it": "15.1.1",
"typescript": "4.7.4"
},
"peerDependencies": {
"@react-native-clipboard/clipboard": "*",
Expand Down
5 changes: 4 additions & 1 deletion src/OtpInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ const OtpInput = forwardRef<TextInput, Props>(
(ref as RefObject<TextInput>)?.current?.setNativeProps({
value: inputValue,
text: inputValue,
secureTextEntry,
});
}, [ref, inputValue]);
}, [ref, inputValue, secureTextEntry]);

const restProps = useMemo(
() =>
Expand All @@ -61,7 +62,9 @@ const OtpInput = forwardRef<TextInput, Props>(
);

return (
// @ts-expect-error
<View style={[inputContainerStyles, focused && focusStyles]}>
{/* @ts-expect-error */}
<TextInput
autoFocus={autoFocus}
onBlur={() => setFocused(false)}
Expand Down
1 change: 1 addition & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ const OtpInputs = forwardRef<OtpInputsRef, Props>(
});
};

// @ts-expect-error
return <View style={style || styles.container}>{renderInputs()}</View>;
},
);
Expand Down
Loading

0 comments on commit a42f1d3

Please sign in to comment.