ui
ui copied to clipboard
[bug]: click combobox in form cause error
Describe the bug
click combobox in form, and the website crash
Affected component/components
combobox
How to reproduce
Codesandbox/StackBlitz link
No response
Logs
No response
System Info
Mac book air m3, chrome 126.0.6478.114
Before submitting
- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Yes. This issue occurs for me too.
HI @siuming-qiu and @RushilJalal, This has been fixed in #4097
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
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>
Hi @yohannestakata, I made changes in PR but it is not approved / merged yet. You are right @SachinCoder1