Skip to content

List Rendering should switch to say that v-if has a higher priority over v-for #534

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

Closed
susanBuck opened this issue Sep 21, 2020 · 1 comment · Fixed by #540
Closed

List Rendering should switch to say that v-if has a higher priority over v-for #534

susanBuck opened this issue Sep 21, 2020 · 1 comment · Fixed by #540
Assignees

Comments

@susanBuck
Copy link
Contributor

In v3, the precedence of v-for and v-if when used on the same node is is now switched.

  • v2: v-for takes precedence over v-if
  • v3: v-if takes precedence over v-for

The v3 notes on List Rendering (https://v3.vuejs.org/guide/list.html#v-for-with-v-if) should be updated to reflect this.

@skirtles-code
Copy link
Contributor

There are several places that need updating:

  1. README.md. The style guide has a whole entry about not using v-for and v-if on the same element. While that's still true the explanation that goes with it is now back-to-front.
  2. directives.md. The API entry for v-if. It should probably also make an attempt to discourage using the two together.
  3. list.md. The section 'v-for with v-if'.
  4. conditional.md. The section 'v-if with v-for'.

It would also be nice if the migration guide entry provided some explanation as to why the change was made. Introducing a breaking change without providing any motivation or justification seems likely to annoy people.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants