armandsalle / my-site

My small website
https://www.armand-salle.fr/
63 stars 5 forks source link

Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()? #8

Open walterhu2020 opened 1 week ago

walterhu2020 commented 1 week ago

when using the autocomplete component it throws below error:

  <FormField
                control={form.control}
                name="keyword"
                render={({ field }) => (
                  <FormItem>
                    <FormLabel>Search items</FormLabel>
                    <FormControl>
                      <AutoCompleteInput
                        options={[
                          { label: "Next.js", value: "next" },
                          { label: "Vue.js", value: "vue" },
                        ]}
                        emptyMessage="No results."
                        placeholder="Type to search something"
                        {...field}
                      />
                    </FormControl>
                    <FormDescription>
                      This is your public display name.
                    </FormDescription>
                    <FormMessage />
                  </FormItem>
                )}
              />
image
armandsalle commented 4 days ago

You can take a look at this comment https://github.com/armandsalle/my-site/issues/5#issuecomment-2218682891 it will helps you