ui
ui copied to clipboard
fix(command): add value "true" into tailwind data attribute variant
I manually added a command component and copied the example provided in the documentation, only to find that all command items ended up disabled. It turns out that the Tailwind data attribute selector, data-[disabled]
, doesn't take the value data-disabled="false"
.
@Aslam97 is attempting to deploy a commit to the shadcn-pro Team on Vercel.
A member of the Team first needs to authorize it.
Dupe of #2945, see #2944 :)
The solution I use:
In @/components/ui/command.tsx file, you can change the classname on line 120 as follows: "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected: bg-accent aria-selected:text-accent-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50"