Skip to content
Discussion options

You must be logged in to vote

How about using <Controller /> instead? It looks like the new Select docs don't have an example of a select with a form, but you can get an idea from the legacy docs. Here, <FormField /> uses a Controller internally.

<FormField
  control={form.control}
  name="email"
  render={({ field }) => (
    <FormItem>
        <FormLabel>Email</FormLabel>
        <Select onValueChange={field.onChange} defaultValue={field.value}>
            <FormControl>
                <SelectTrigger>
                    <SelectValue placeholder="Select a verified email to display" />
                </SelectTrigger>
            </FormControl>
            <SelectContent>
                <SelectItem value="m@example…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
2 replies
@decipher-cs
Comment options

@bae080311
Comment options

Comment options

You must be logged in to vote
4 replies
@decipher-cs
Comment options

@BrendanC23
Comment options

@decipher-cs
Comment options

@BrendanC23
Comment options

Answer selected by decipher-cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants