-
Notifications
You must be signed in to change notification settings - Fork 180
Closed
Description
Is your feature request related to a problem? Please describe.
This is a fairly common scenario:
new ChoiceOption({
label: 'yes',
value: true
}),
new ChoiceOption({
label: 'no',
value: false
})
I have a yes/no question and I would like the answer to be a boolean so that I don't need to coerce it to a boolean later. Currently, doing this results in this error:
[Vue warn]: Invalid prop: type check failed for prop "value". Expected String, Array, got Boolean with value true.
Because of the way the value prop is configured in Question.vue..
Describe the solution you'd like
Allow booleans to be accepted as values.
Describe alternatives you've considered
let booleanAnswer = question.answer === 'true' ? true : false
Metadata
Metadata
Assignees
Labels
No labels