Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: click combobox in form cause error #4106

Open
2 tasks done
siuming-qiu opened this issue Jun 26, 2024 · 5 comments
Open
2 tasks done

[bug]: click combobox in form cause error #4106

siuming-qiu opened this issue Jun 26, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@siuming-qiu
Copy link

Describe the bug

click combobox in form, and the website crash

Affected component/components

combobox

How to reproduce

20240627-010755

Codesandbox/StackBlitz link

No response

Logs

No response

System Info

Mac book air m3, chrome 126.0.6478.114

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues
@siuming-qiu siuming-qiu added the bug Something isn't working label Jun 26, 2024
@RushilJalal
Copy link

Yes. This issue occurs for me too.

@manjushsh
Copy link

HI @siuming-qiu and @RushilJalal, This has been fixed in #4097

@yohannestakata
Copy link

yohannestakata commented Jun 28, 2024

HI @siuming-qiu and @RushilJalal, This has been fixed in #4097

Hi. I just came here after finding the issue just now. Please take a look at the combobox at the forms example

@SachinCoder1
Copy link

Quick fix: You can fix it by using CommandList instead of CommandGroup

              <Command>
                <CommandInput placeholder="Search language..." />
                <CommandEmpty>No language found.</CommandEmpty>
                <CommandList>
                  {languages?.map((language) => (
                    <CommandItem
                      value={language.label}
                      key={language.value}
                      onSelect={() => {
                        form.setValue("language", language.value)
                      }}
                    >
                      <Check
                        className={cn(
                          "mr-2 h-4 w-4",
                          language.value === field.value
                            ? "opacity-100"
                            : "opacity-0"
                        )}
                      />
                      {language.label}
                    </CommandItem>
                  ))}
                </CommandList>
              </Command>

@manjushsh
Copy link

manjushsh commented Jun 28, 2024

Hi @yohannestakata, I made changes in PR but it is not approved / merged yet.
You are right @SachinCoder1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants