-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Added a note about prop modifiers on render function examples #1712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for vuejs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
src/api/built-in-directives.md
Outdated
@@ -328,6 +328,15 @@ Dynamically bind one or more attributes, or a component prop to an expression. | |||
<div .someProperty="someObject"></div> | |||
``` | |||
|
|||
The `.attr` modifier has a shorthand `^`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the ^
template shorthand should be documented.
It was documented previously but we reverted it because it doesn't work. See #1658. After that PR was merged I confirmed with Evan that this is intentional and it shouldn't be included in the docs.
To be clear, it is specifically the template shorthand that doesn't work. Using it as a prefix in a render
function works fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@skirtles-code thanks! Removed the added part from directives doc
src/guide/extras/render-function.md
Outdated
@@ -39,6 +39,9 @@ h('div', { id: 'foo' }) | |||
// Vue automatically picks the right way to assign it | |||
h('div', { class: 'bar', innerHTML: 'hello' }) | |||
|
|||
// props modifiers such as .prop and .attr can be added via shorthands |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this explanation will need tweaking, as we can't document ^
as a shorthand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the explanation
Description of Problem
See #1649
Proposed Solution
Add a shorthand for
.attr
in the directives guide and a note on how to use modifiers in the render functionClose #1649