question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using v-if and v-for on the same element is not recommended

See original GitHub issue

Currently getting the error in the title.

Full error:

vue.common.js?4a36:1137[Vue warn]: <div v-for="field in fields" v-if="fieldVisible(field)">: Using v-if and v-for on the same element is not recommended - consider filtering the source Array instead. (found in component: <vue-form-generator>)

Am I doing something wrong?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
lionel-bijaouicommented, Sep 29, 2016

I don’t think you did anything wrong, this is something we missed. We never got this message on our dev environment, because we were using "vue": "1.0.26". I just updated "vue": "1.0.27" and I got the same message. So this is new and we need to change the way it work. You don’t need to worry too much about this message for now, and we will fix it. Thank you for your feedback

1reaction
lionel-bijaouicommented, Sep 29, 2016

@icebob hive mind! 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using v-for and v-if in the same element - Stack Overflow
You can't really use v-if and v-for on the same element. Best to put the v-if on a parent element.
Read more >
v-if vs. v-for Precedence - Vue 3 Migration Guide
It is recommended to avoid using both on the same element due to the syntax ambiguity. Rather than managing this at the template...
Read more >
When v-if and v-show are used on the same element, leave ...
v-if and v-show are not supposed to be used together for transition purposes, because they entail conflicting start/ending states. Regarding ...
Read more >
Variance Inflation Factor - an overview | ScienceDirect Topics
The VIF of an explanatory variable indicates the strength of the linear relationship between the variable and the remaining explanatory variables. A rough...
Read more >
Variance inflation factor - Wikipedia
In statistics, the variance inflation factor (VIF) is the ratio (quotient) of the variance of estimating some parameter in a model that includes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found