Skip to content

Commit 2445caf

Browse files
committed
added enter handling to manual update dialog
1 parent c44f8ff commit 2445caf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/components/habit/manual-completion-dialog.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ export const ManualCompletionDialog: React.FC<P> = ({ children, onSubmit }) => {
3838
value={value}
3939
onFocus={(e) => e.target.select()}
4040
onChange={(e) => setValue(e.target.valueAsNumber || 0)}
41+
onKeyDown={(e) => {
42+
if (e.key === "Enter") {
43+
handleSubmit()
44+
}
45+
}}
4146
/>
4247

4348
<DialogFooter>

0 commit comments

Comments
 (0)