Skip to content

Commit

Permalink
Use setValue (from useForm) instead of using `field.onChange
Browse files Browse the repository at this point in the history
Co-authored-by: Patrick Kalita <pkalita@lbl.gov>
  • Loading branch information
eecavanna and pkalita-lbl authored Jul 15, 2024
1 parent ed22713 commit a297817
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/StudyForm/StudyForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const StudyForm: React.FC<StudyFormProps> = ({ submission, onSave }) => {
slot={"end"}
title={"Use my name"}
aria-label={"Use my name"}
onClick={() => field.onChange(loggedInUser.name)}
onClick={() => setValue(field.name, loggedInUser.name)}
disabled={field.value === loggedInUser.name}
>
<IonIcon
Expand Down

0 comments on commit a297817

Please sign in to comment.