Skip to content

Commit

Permalink
Merge pull request #22356 from Nikhil-Vats/22183_fix_eye_icon_bug
Browse files Browse the repository at this point in the history
Fix eye icon bug

(cherry picked from commit 54366f1)
  • Loading branch information
marcaaron authored and OSBotify committed Jul 6, 2023
1 parent 8a0e088 commit bfe0b33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/TextInput/BaseTextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ function BaseTextInput(props) {
};

const togglePasswordVisibility = useCallback(() => {
setPasswordHidden((prevState) => !prevState.passwordHidden);
setPasswordHidden((prevPasswordHidden) => !prevPasswordHidden);
}, []);

const storePrefixLayoutDimensions = useCallback((event) => {
Expand Down Expand Up @@ -347,7 +347,7 @@ function BaseTextInput(props) {
/>
{Boolean(props.secureTextEntry) && (
<Checkbox
style={styles.textInputIconContainer}
style={[styles.flex1, styles.textInputIconContainer]}
onPress={togglePasswordVisibility}
onMouseDown={(e) => e.preventDefault()}
accessibilityLabel={props.translate('common.visible')}
Expand Down

0 comments on commit bfe0b33

Please sign in to comment.