Synchronous Fields Reset for Set Logging, Tests fixed
Some checks are pending
Copilot Setup Steps / copilot-setup-steps (push) Waiting to run

This commit is contained in:
AG
2025-12-20 15:37:47 +02:00
parent af5c855c21
commit 77789d31ca
5 changed files with 47 additions and 27 deletions

View File

@@ -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('');