From 79c71f86b8890d028eea342992ef1fc96ee7d35c Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Tue, 14 Feb 2023 01:44:07 +0200 Subject: [PATCH] login with enter key --- src/features/login/components/LoginComponent.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/features/login/components/LoginComponent.js b/src/features/login/components/LoginComponent.js index 42b78cb..c701f54 100644 --- a/src/features/login/components/LoginComponent.js +++ b/src/features/login/components/LoginComponent.js @@ -43,6 +43,9 @@ const LoginComponent = ({ credentials, onChange, onLogin }) => { className={classes.field} onChange={onChange("password")} value={credentials.password} + onKeyDown={e => { + if (e.key === "Enter") onLogin(); + }} />