mirror of
https://github.com/linuxserver/budge.git
synced 2026-03-09 00:08:38 +08:00
adding new category to a group defaults the selected group, hitting 'enter' on login screen submits a login attempt
This commit is contained in:
parent
0ed43c1bc5
commit
bb6890ffa5
@ -18,6 +18,8 @@ export default function NewCategoryDialog(props) {
|
||||
const dispatch = useDispatch()
|
||||
const categoryGroups = useSelector(categoryGroupsSelectors.selectAll)
|
||||
|
||||
console.log(props)
|
||||
|
||||
/**
|
||||
* State block
|
||||
*/
|
||||
@ -86,8 +88,10 @@ export default function NewCategoryDialog(props) {
|
||||
return
|
||||
}
|
||||
|
||||
const isSelected = group.id === props.categoryGroupId
|
||||
|
||||
return (
|
||||
<MenuItem value={group.id} key={group.id}>
|
||||
<MenuItem value={group.id} key={group.id} selected={isSelected}>
|
||||
{group.name}
|
||||
</MenuItem>
|
||||
)
|
||||
|
||||
@ -156,6 +156,13 @@ export default function Login() {
|
||||
await initUser()
|
||||
}
|
||||
|
||||
const onKeyPress = e => {
|
||||
switch (e.key) {
|
||||
case 'Enter':
|
||||
return handleLogin()
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<AlertDialog open={alertDialogOpen} body={alertDialogBody} handleClose={() => setAlertDialogOpen(false)} />
|
||||
@ -172,6 +179,7 @@ export default function Login() {
|
||||
fullWidth
|
||||
variant="standard"
|
||||
onChange={onEmailChange}
|
||||
onKeyPress={onKeyPress}
|
||||
/>
|
||||
<TextField
|
||||
margin="dense"
|
||||
@ -181,6 +189,7 @@ export default function Login() {
|
||||
fullWidth
|
||||
variant="standard"
|
||||
onChange={onPasswordChange}
|
||||
onKeyPress={onKeyPress}
|
||||
/>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user