From 4d219581d0d1f09f5515e0fcc7464dcd4151da1f Mon Sep 17 00:00:00 2001 From: Brandon Presley Date: Fri, 30 Sep 2022 15:16:56 +1300 Subject: [PATCH] Use lambdas for submit editing in EditWorkout For some reason the next ref wouldn't get focused if I passed the functions without wrapping in a lambda. --- EditWorkout.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/EditWorkout.tsx b/EditWorkout.tsx index f66e2c3..928e1da 100644 --- a/EditWorkout.tsx +++ b/EditWorkout.tsx @@ -134,7 +134,7 @@ export default function EditWorkout() { onChangeText={handleSteps} label="Steps" multiline - onSubmitEditing={setsRef.current?.focus} + onSubmitEditing={() => setsRef.current?.focus()} /> )} minutesRef.current?.focus()} /> secondsRef.current?.focus()} value={minutes} onChangeText={setMinutes} label="Rest minutes"