Skip to content

Commit 2bdd7f6

Browse files
Reword absent Boolean prop customization note (vuejs#1986)
* Reword absent Boolean prop customization note Reword sentence about customizing the default behaviour of boolean props. Previous sentence ends up communicating that the built in behaviour is not desirable, which one would assume is not the case or it would not have been built in. * Boolean prop customization note punctuation fix Co-authored-by: Natalia Tepluhina <[email protected]> Co-authored-by: Natalia Tepluhina <[email protected]>
1 parent 1f0490f commit 2bdd7f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/guide/components/props.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ Additional details:
484484

485485
- An absent optional prop other than `Boolean` will have `undefined` value.
486486

487-
- The `Boolean` absent props will be cast to `false`. You should set a `default` value for it in order to get desired behavior.
487+
- The `Boolean` absent props will be cast to `false`. You can change this by setting a `default` for it — i.e.: `default: undefined` to behave as a non-Boolean prop.
488488

489489
- 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.
490490

0 commit comments

Comments
 (0)