Closed Z3RO-O closed 2 weeks ago
I submitted a PR about it.
It happens the same with the combobox form. Please check
@Rekl0w Ok thanks for letting me know
@greatstefan yes it is the same.
Yes, the problem was because I had a "CommandGroup" component directly in "Command" and I had to wrap the "CommandGroup" in another component called "CommandList" and now works. So:
<CommandList>
<CommandGroup>
{options.map((option) => (
<CommandItem
key={option.value}
onSelect={() => {
onChange(option.value === value ? "" : option.value)
setOpen(false)
}}
>
<Check
className={cn(
"mr-2 h-4 w-4",
value === option.value ? "opacity-100" : "opacity-0"
)}
/>
{option.label}
</CommandItem>
))}
</CommandGroup>
</CommandList>
Describe the bug
When clicked on Languages Trigger button on examples in form on shadcn website the app crashes due to undefined value in that popover component.
Affected component/components
Popover
How to reproduce
Codesandbox/StackBlitz link
https://github.com/shadcn-ui/ui/tree/06cc0cdf3d080555d26abbe6639f2d7f6341ec73/apps/www/app/(app)/examples/forms/account
Logs
No response
System Info
Before submitting