Replies: 2 comments 1 reply
-
Does anyone facing the same error and maybe have a suggestion on how to fix it? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Have you tried "checked === true"? Like mine: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am encountering an error in my code that uses the shadcdn library. The error specifically occurs with the Checkbox onCheckedChange event in the following part of my code:
The error message I'm getting is:
TS2322: Type '(event: boolean | ChangeEvent<Element>) => void' is not assignable to type '(checked: CheckedState) => void'. Types of parameters 'event' and 'checked' are incompatible. Type 'CheckedState' is not assignable to type 'boolean | ChangeEvent<Element>'. Type '"indeterminate"' is not assignable to type 'boolean | ChangeEvent<Element>'.
Additionally, I am also using react-hook-form and zod for validation, as shown in the following code snippet:
Could you please help me understand the cause of this error and suggest a possible solution?
Beta Was this translation helpful? Give feedback.
All reactions