You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the CFormCheck component to allow the user to select an option, but I can't figure out how to get the value of the selected button back to my state variable. Should I be setting the model-value attribute? If so, how does that work? Every time I try to set it, the attribute takes on the value true no matter what value I pass in. Is there an example on the documentation site? Thank you.
I think the issue has to do with this line and this line. When the change event happens, the checked status is returned via the 'update:modelValue' event. Eventually, the checked status will be true and won't change because the value returned by the event will always be true (because the current button state is true).
I hope form components themselves and the docs will be updated.
I am getting radios' value with an ugly trick like the below about this issue. I hope it helps.
I'm using the CFormCheck component to allow the user to select an option, but I can't figure out how to get the value of the selected button back to my state variable. Should I be setting the
model-value
attribute? If so, how does that work? Every time I try to set it, the attribute takes on the valuetrue
no matter what value I pass in. Is there an example on the documentation site? Thank you.Example:
The text was updated successfully, but these errors were encountered: