We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0a9c78 commit b50c2f3Copy full SHA for b50c2f3
frontend/src/libs/components/input/input.tsx
@@ -66,9 +66,9 @@ const Input = <T extends FieldValues>({
66
const toggleShowPassword = useCallback(
67
(event: React.MouseEvent<HTMLElement>): void => {
68
event.preventDefault();
69
- setIsPasswordShown(!isPasswordShown);
+ setIsPasswordShown((old) => !old);
70
},
71
- [isPasswordShown],
+ [],
72
);
73
74
const clearError = useCallback(() => {
@@ -116,6 +116,7 @@ const Input = <T extends FieldValues>({
116
styles.passwordEye,
117
isPasswordShown && styles.passwordEyeLight,
118
)}
119
+ type="button"
120
onClick={toggleShowPassword}
121
tabIndex={-1}
122
>
0 commit comments