login with enter key

master
Tudor Stanciu 2023-02-14 01:44:07 +02:00
parent 7f6056baf4
commit 79c71f86b8
1 changed files with 3 additions and 0 deletions

View File

@ -43,6 +43,9 @@ const LoginComponent = ({ credentials, onChange, onLogin }) => {
className={classes.field} className={classes.field}
onChange={onChange("password")} onChange={onChange("password")}
value={credentials.password} value={credentials.password}
onKeyDown={e => {
if (e.key === "Enter") onLogin();
}}
/> />
</CardContent> </CardContent>
<CardActions> <CardActions>