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: Checkbox input not responsive if checked value is "true" #2911

Closed
wackazong opened this issue Mar 15, 2024 · 3 comments
Closed

bug: Checkbox input not responsive if checked value is "true" #2911

wackazong opened this issue Mar 15, 2024 · 3 comments

Comments

@wackazong
Copy link

wackazong commented Mar 15, 2024

What version of daisyUI are you using?

v4.7.3

Which browsers are you seeing the problem on?

Chrome

Reproduction URL

https://play.tailwindcss.com/dbreoATM6k

Describe your issue

See Tailwind play. I would expect all toggles to work.

Copy link

Thank you @wackazong 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.

@yanggggjie
Copy link

yanggggjie commented Mar 15, 2024

I tested your case.

According to source code, in this file: https://github.com/saadeghi/daisyui/blob/master/src/components/styled/toggle.css
line 24.

&[checked="true"]
This selector will always select the broken one.

I copy the case code in playground to reproduce in local and reomove the selector, it works well.
Like this:
image

@wackazong
Copy link
Author

I agree. If that selector is removed then the toggle behaves as expected in all cases. As a workaround I remove this selector now manually in my tailwind setup.

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

No branches or pull requests

2 participants