Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Aslam97
Copy link

@Aslam97 Aslam97 commented Mar 10, 2024

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

Copy link

vercel bot commented Mar 10, 2024

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

A member of the Team first needs to authorize it.

@jhnguyen521
Copy link
Contributor

Dupe of #2945, see #2944 :)

@Kqan1
Copy link

Kqan1 commented Mar 16, 2024

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants