Skip to content

Commit

Permalink
adj: remove form trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
Cranbaerry committed Oct 8, 2024
1 parent 1896a2e commit 8174a7a
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions components/ui/questionnaire-section-user.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ export default function DataDiriSection() {
const user = await getUserData();
if (user != null) {
form.setValue("fullName", user.user_metadata.full_name ?? "");
form.setValue("email", user.email ?? "");
}
};
fetchData();
}, [form]);
}, []);

return (
<>
Expand All @@ -58,7 +57,6 @@ export default function DataDiriSection() {
{...field}
onChange={(e) => {
field.onChange(e.target.value);
form.trigger("fullName");
}}
required
/>
Expand Down Expand Up @@ -98,7 +96,6 @@ export default function DataDiriSection() {
<RadioGroup
onValueChange={(value) => {
field.onChange(value);
form.trigger("gender");
}}
defaultValue={field.value}
className="flex flex-row space-y-1"
Expand Down Expand Up @@ -134,7 +131,6 @@ export default function DataDiriSection() {
<Select
onValueChange={(value) => {
field.onChange(value);
form.trigger("profession");
}}
defaultValue={field.value}
>
Expand Down Expand Up @@ -167,7 +163,6 @@ export default function DataDiriSection() {
<Select
onValueChange={(value) => {
field.onChange(value);
form.trigger("educationLevel");
}}
defaultValue={field.value}
>
Expand Down Expand Up @@ -217,7 +212,6 @@ export default function DataDiriSection() {
{...field}
onChange={(e) => {
field.onChange(e.target.value);
form.trigger("school");
}}
/>
</FormControl>
Expand Down

0 comments on commit 8174a7a

Please sign in to comment.