Using v-if and v-for on the same element is not recommended
See original GitHub issueCurrently 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:
- Created 7 years ago
- Comments:8 (6 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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@icebob hive mind! 😄