fix: secret input on tab moves to next field and masks value

This commit is contained in:
ShubhamPalriwala
2024-06-07 13:05:04 +05:30
parent c1ca2a6f8c
commit 9d46c269d4
2 changed files with 7 additions and 3 deletions

View File

@@ -96,8 +96,12 @@ export const SecretInput = forwardRef<HTMLTextAreaElement, Props>(
}}
disabled={isDisabled}
spellCheck={false}
onBlur={(evt) => {
onBlur?.(evt);
onKeyDown={(evt) => {
if (evt.key === "Tab") {
setIsSecretFocused.off();
}
}}
onBlur={() => {
setIsSecretFocused.off();
}}
value={value || ""}

View File

@@ -178,7 +178,7 @@ export const AddShareSecretModal = ({ popUp, handlePopUpToggle }: Props) => {
errorText={error?.message}
>
<SecretInput
isVisible
isVisible={false}
{...field}
containerClassName="py-1.5 rounded-md transition-all group-hover:mr-2 text-bunker-300 hover:border-primary-400/50 border border-mineshaft-600 bg-mineshaft-900 px-2 min-h-[100px]"
/>