From e1ca0502d1cc783a29c626f38c1a3bfe2d6c7199 Mon Sep 17 00:00:00 2001 From: Nikhil Vats Date: Thu, 6 Jul 2023 23:00:07 +0530 Subject: [PATCH] Fix eye icon bug --- src/components/TextInput/BaseTextInput.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index c9c61207f81e..ef7654611ccc 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -218,7 +218,7 @@ function BaseTextInput(props) { }; const togglePasswordVisibility = useCallback(() => { - setPasswordHidden((prevState) => !prevState.passwordHidden); + setPasswordHidden((prevPasswordHidden) => !prevPasswordHidden); }, []); const storePrefixLayoutDimensions = useCallback((event) => { @@ -347,7 +347,7 @@ function BaseTextInput(props) { /> {Boolean(props.secureTextEntry) && ( e.preventDefault()} accessibilityLabel={props.translate('common.visible')}