rfcs icon indicating copy to clipboard operation
rfcs copied to clipboard

Introduce .bool modifier to v-bind

Open leopiccionia opened this issue 4 years ago • 2 comments

Summary

Introduce new syntax to simplify adding/removing boolean attributes:

  • .bool modifier to v-bind
  • ?attr shorthand for v-bind:attr.bool

Links


Important: Do NOT comment on this PR. Please use the discussion thread linked above to provide feedback, as it provides branched discussions that are easier to follow. This also makes the edit history of the PR clearer.

leopiccionia avatar Nov 03 '21 02:11 leopiccionia

Any further discussion or planning for this? Would like to know if it's moving forward and how I can help.

jfbrennan avatar Aug 08 '22 20:08 jfbrennan

Are you accepting PRs for this RFC? I already created a custom v-attr directive with a .bool modifier in one of the projects so I may be willing to contribute and adapt it.

EDIT: After looking at the v-bind implementation in Vue I realized that it's not implemented as a Vue directive but rather is embedded in a Vue compiler core as a transform which means that it's going to be impossible for me to contribute 😂

gund avatar Sep 22 '22 15:09 gund