Closed hyvyys closed 4 years ago
Hi @hyvyys,
Thanks for the report and reproduction 👍.
There seems to be an issue with the way we pass an option's value from UiRadioGroup
to UiRadio
:
The way it is setup now means option values that are falsy e.g. ""
cause it to fallback to the using the entire option (assuming it's a string).
You can work around this for now by have setting a value for each options. In your case you might use default
as the value for the default option.
Issue
I'm using UiRadioGroup with Object options:
On page load and on each click on the radio I get tons of error messages complaining about invalid prop types for props
value
andtruevalue
ofUiRadio
as well as propvalue
for UiRadioGroup.Invalid prop: type check failed for prop "trueValue". Expected Number, String, got Object
Despite the errors, the component works properly. This issue occurs for me using Vue-Cli and without it. Doesn't happen in a Codepen, though https://codepen.io/hyvyys/pen/NWKwRwW.
See error messages
``` [Vue warn]: Invalid prop: type check failed for prop "trueValue". Expected Number, String, got Object found in --->Reproduction
https://github.com/hyvyys/keen-ui-radio-test