Skip to content

Commit

Permalink
fix(www): register field array input once
Browse files Browse the repository at this point in the history
  • Loading branch information
Moshyfawn committed May 28, 2023
1 parent dffbe89 commit 1b51bcb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/www/app/examples/forms/profile-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ export function ProfileForm() {
<FormField
control={form.control}
key={field.id}
name={`urls.${index}`}
render={() => (
name={`urls.${index}.value`}
render={({ field }) => (
<FormItem>
<FormLabel className={cn(index !== 0 && "sr-only")}>
URLs
Expand All @@ -167,7 +167,7 @@ export function ProfileForm() {
Add links to your website, blog, or social media profiles.
</FormDescription>
<FormControl>
<Input {...form.register(`urls.${index}.value`)} />
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
Expand Down

0 comments on commit 1b51bcb

Please sign in to comment.