taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 6f4c0a6fb244b8e42b6d91edd3c5901ae39f2202
parent 3aad5e774dc44fc0d757f6c22152fcbb2b54ca1b
Author: Florian Dold <florian@dold.me>
Date:   Wed, 13 Oct 2021 19:34:54 +0200

anastasis-webui: auto-focus

Diffstat:
Mpackages/anastasis-webui/src/routes/home/index.tsx | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/packages/anastasis-webui/src/routes/home/index.tsx b/packages/anastasis-webui/src/routes/home/index.tsx @@ -585,10 +585,10 @@ function AuthMethodSmsSetup(props: AuthMethodSetupProps) { }, }); }; - //const inputRef = useRef<HTMLInputElement>(null); - // useLayoutEffect(() => { - // inputRef.current?.focus(); - // }, []); + const inputRef = useRef<HTMLInputElement>(null); + useLayoutEffect(() => { + inputRef.current?.focus(); + }, []); return ( <AnastasisClientFrame hideNav title="Add SMS authentication"> <div> @@ -601,7 +601,7 @@ function AuthMethodSmsSetup(props: AuthMethodSetupProps) { Mobile number:{" "} <input value={mobileNumber} - //ref={inputRef} + ref={inputRef} style={{ display: "block" }} autoFocus onChange={(e) => setMobileNumber((e.target as any).value)}