diff --git a/src/components/form/paymentForm.tsx b/src/components/form/paymentForm.tsx index 38bbc4d..87bacb1 100644 --- a/src/components/form/paymentForm.tsx +++ b/src/components/form/paymentForm.tsx @@ -69,6 +69,7 @@ export default function PaymentForm({value, entities, categories, onSubmit, clas const payeeRef = useRef({} as HTMLInputElement); const categoryRef = useRef({} as HTMLInputElement); + const submitRef = useRef({} as HTMLButtonElement); return (
@@ -149,7 +150,9 @@ export default function PaymentForm({value, entities, categories, onSubmit, clas {...field} onChange={(e) => { field.onChange(e); - payeeRef && payeeRef.current.focus(); + if (e && e.target.value) { + payeeRef && payeeRef.current.focus(); + } }}/>