From cb5aa72552bddff2c1b2584e8efeb667e426d024 Mon Sep 17 00:00:00 2001 From: Brandon Presley Date: Tue, 24 Oct 2023 16:16:42 +1300 Subject: [PATCH] Submit weight after entering value --- EditWeight.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/EditWeight.tsx b/EditWeight.tsx index d617aef..2b159d2 100644 --- a/EditWeight.tsx +++ b/EditWeight.tsx @@ -39,7 +39,7 @@ export default function EditWeight() { }, []) ); - const handleSubmit = async () => { + const submit = async () => { if (!value) return; const newWeight: Partial = { @@ -93,11 +93,11 @@ export default function EditWeight() { unitRef.current?.focus()} + onSubmitEditing={submit} /> {settings.showUnit && ( @@ -124,7 +124,7 @@ export default function EditWeight() { mode="outlined" icon="content-save" style={{ margin: MARGIN }} - onPress={handleSubmit} + onPress={submit} > Save