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: quick fix to data attribute at CommandPrimitive.Item that was applying a disabled state style all the time #3680

Conversation

ricardoraposo
Copy link
Contributor

Data attributes at <CommandPrimite.List /> component should be written as data-[disabled=true] in order to avoid styles being applied to element, even when it's not disabled.

applying a disabled state style all the time
Copy link

vercel bot commented May 6, 2024

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

A member of the Team first needs to authorize it.

@loiclefloch
Copy link

Hello @ricardoraposo, I had the same problem and fixed it the same way. Thank you for your Pull Request, it allowed me to be sure that my fix was correct.

@loiclefloch loiclefloch mentioned this pull request May 7, 2024
2 tasks
@Sisableng
Copy link

@shadcn u need to review this PR

@AmsBarros
Copy link

Thank you so much. I was struggling with this too until I saw your PR

@pbroom
Copy link

pbroom commented May 8, 2024

+1 for this PR. I had the same issue and this change fixed it.

@imxfrq
Copy link

imxfrq commented May 10, 2024

@ricardoraposo thankkkssss .. ui -> command.tsx -> [search] CommandPrimitive.Item -> [Copy Paste]
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 data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 0"

@GabrielRuivo
Copy link

thanks so much @ricardoraposo, @shadcn please review this PR

Copy link

vercel bot commented May 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 13, 2024 4:59am

@shadcn shadcn added bug Something isn't working component: command labels May 13, 2024
Copy link
Collaborator

@shadcn shadcn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

@kodiakhq kodiakhq bot merged commit 13d9693 into shadcn-ui:main May 13, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants