ui icon indicating copy to clipboard operation
ui copied to clipboard

fix(command): add value "true" into tailwind data attribute variant

Open Aslam97 opened this issue 11 months ago • 2 comments

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".

Screenshot 2024-03-10 at 22 40 39

Aslam97 avatar Mar 10 '24 15:03 Aslam97

@Aslam97 is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Mar 10 '24 15:03 vercel[bot]

Dupe of #2945, see #2944 :)

jhnguyen521 avatar Mar 10 '24 16:03 jhnguyen521

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"

Kqan1 avatar Mar 16 '24 20:03 Kqan1