Synchronous Fields Reset for Set Logging, Tests fixed
Some checks are pending
Copilot Setup Steps / copilot-setup-steps (push) Waiting to run
Some checks are pending
Copilot Setup Steps / copilot-setup-steps (push) Waiting to run
This commit is contained in:
@@ -140,6 +140,8 @@ export const useTracker = (props: any) => { // Props ignored/removed
|
||||
const updateSelection = async () => {
|
||||
if (selectedExercise) {
|
||||
setSearchQuery(selectedExercise.name);
|
||||
// Reset form synchronously to clear previous exercise data immediately
|
||||
form.resetForm();
|
||||
await form.updateFormFromLastSet(selectedExercise.id, selectedExercise.type, selectedExercise.bodyWeightPercentage);
|
||||
} else {
|
||||
setSearchQuery('');
|
||||
|
||||
Reference in New Issue
Block a user