Custom checkbox initial checked state not working #3251
lebadapetru
started this conversation in
General
Replies: 2 comments 3 replies
-
I made a few changes which fixed my issue with boolean values but i still got problems with String values when the checkbox's checked state is true on initial load:
If the :value is string, it won't check the box on initial load but if i manually change it, the checkboxChecked, checkboxValue have the right value. I left some comms on the above code, whenever you got the time if you can help me out , thank you. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hey there, have you tried having
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey @logaretm,
I've been trying to set the initial checked state to true but with no success and if you could assist me to figure this out, would be great
CustomCheckbox:
The intended use for this component is for a 'term&conditions' agree check and it can either have the initial value on true or false. I'm setting the value prop because i have a yup boolean validation in the parent form and if i omit it, the default is 'on' which isn't a bool and an error will be triggered. The problem is that setting the initialValue with the modelValue will check the box regardless of its value being false.
Beta Was this translation helpful? Give feedback.
All reactions