Open bleedingAyush opened 1 month ago
Yes, I have encountered the same problem, which has not been solved yet.
I've submitted a PR for fixing this bug:
Please check the video in the bug replication steps and if you are experiencing the same bug, here are the fixes:
package.json
.const CommandItem = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Item>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>
>(({ className, disabled, ...props }, ref) => (
<CommandPrimitive.Item
ref={ref}
disabled={disabled}
className={cn(
"relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground",
disabled ? "opacity-50" : '',
className
)}
{...props}
/>
))
Describe the bug
I was trying to create team selector so I copied the code from your repo TeamSwitcher.tsx
After doing everything as expected the CommandItem was not working. After inspecting the devtools I found out that it is disabled
Affected component/components
CommandItem
How to reproduce
Codesandbox/StackBlitz link
No response
Logs
No response
System Info
Before submitting