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

bug: filter component not hiding other radio button choices #3451

Open
si4dev opened this issue Feb 3, 2025 · 6 comments
Open

bug: filter component not hiding other radio button choices #3451

si4dev opened this issue Feb 3, 2025 · 6 comments
Assignees
Labels

Comments

@si4dev
Copy link

si4dev commented Feb 3, 2025

What version of daisyUI are you using?

5.0.0-beta.6

Which browsers are you seeing the problem on?

Chrome

Reproduction URL

https://play.tailwindcss.com/hve4LcIl13

Describe your issue

I found out that the component is missing the filter.not class which is working properly on the demo page. Because of this the other radio buttons are not hiding in case one is selected.

.filter:not(:has(input:checked:not(.filter-reset))) .filter-reset, .filter:not(:has(input:checked:not(.filter-reset))) input[type=reset], .filter:has(input:checked:not(.filter-reset)) input:not(:checked,.filter-reset,input[type=reset]) {
  opacity: 0;
  border-width: 0;
  width: 0;
  margin-inline: 0;
  padding-inline: 0;
  scale: 0;
}
Copy link

github-actions bot commented Feb 3, 2025

Thank you @si4dev for reporting issues. It helps daisyUI a lot 💚
I'll be working on issues one by one. I will help with this one as soon as a I find a solution.
In the meantime providing more details and reproduction links would be helpful.

@saadeghi
Copy link
Owner

saadeghi commented Feb 3, 2025

Your Tailwind Play link is Tailwind CSS 3 and daisyUI 4.
It works with Tailwind CSS 4 and daisyUI 5:
https://play.tailwindcss.com/0xVZR3jbYH

Let me know if you have a question.

@saadeghi saadeghi closed this as completed Feb 3, 2025
@si4dev
Copy link
Author

si4dev commented Feb 3, 2025

I do see your working example. However in my local SvelteKit project I'm using daisyUI V5 and tailwindcss 4.0.3 it is not working.

After some more debugging I've isolated the cause to be the prefix.

@plugin "daisyui" {
  prefix: 'dz-';
}

When I remove the prefix in both the setting as the html classes to test then the filter is working properly.

@saadeghi
Copy link
Owner

saadeghi commented Feb 4, 2025

Thanks for the details.
Yes I can confirm it doesn't work with prefix.
https://play.tailwindcss.com/GPZVk25mPT

Will be fixed soon 👍

@saadeghi saadeghi reopened this Feb 4, 2025
@saadeghi saadeghi self-assigned this Feb 4, 2025
@saadeghi saadeghi added the v5 label Feb 6, 2025
@saadeghi
Copy link
Owner

saadeghi commented Feb 6, 2025

fixed in 5.0.0-beta.7

@si4dev
Copy link
Author

si4dev commented Feb 7, 2025

To confirm that it is working properly now. Thanks for the fix and the nice library!

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

No branches or pull requests

2 participants