-
-
Notifications
You must be signed in to change notification settings - Fork 471
Closed
Labels
bugSomething isn't workingSomething isn't workinggood reproduction ✨This issue provides a good reproduction, we will be able to investigate it firstThis issue provides a good reproduction, we will be able to investigate it firstupstream
Description
Optional props in Vue 3 are not optional anymore on the resolved props
value from defineProps
:
Additionally, Vue 3 casts optional boolean props to only type boolean
, because of https://vuejs.org/guide/components/props.html#boolean-casting.
The only correct way to allow undefined
for a boolean prop is to manually set it as a default with withDefaults
. (see reproduction components/BooleanWithUndefined.vue
)
This should also reflect in the <template>
.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood reproduction ✨This issue provides a good reproduction, we will be able to investigate it firstThis issue provides a good reproduction, we will be able to investigate it firstupstream