Skip to content

Commit e3c14fb

Browse files
jay-esNataliaTepluhinasondh0127
authored
Correct default value for absent props.The Boolean missing prop will cast to false instead of undefined, vuejs/core#5863 (comment) (#536) (#537)
* fix: update named slots diagram Close #1688 * Correct default value for absent props. (#1705) The Boolean missing prop will cast to false instead of undefined, vuejs/core#5863 (comment) Co-authored-by: Natalia Tepluhina <[email protected]> Co-authored-by: sondh0127 <[email protected]>
1 parent fb64675 commit e3c14fb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/guide/components/props.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,9 @@ Additional details:
482482

483483
- All props are optional by default, unless `required: true` is specified.
484484

485-
- An absent optional prop will have `undefined` value.
485+
- An absent optional prop other than `Boolean` will have `undefined` value.
486+
487+
- The `Boolean` absent props will be cast to `false`. You should set a `default` value for it in order to get desired behavior.
486488

487489
- If a `default` value is specified, it will be used if the resolved prop value is `undefined` - this includes both when the prop is absent, or an explicit `undefined` value is passed.
488490

0 commit comments

Comments
 (0)