Skip to content
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

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

Closed
Cannonb4ll opened this issue Sep 29, 2016 · 8 comments
Closed

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

Cannonb4ll opened this issue Sep 29, 2016 · 8 comments
Labels
Milestone

Comments

@Cannonb4ll
Copy link

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?

@lionel-bijaoui
Copy link
Member

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

@Cannonb4ll
Copy link
Author

Then I experienced the same issue, I did an npm update yesterday and with that some new versions came along. Ever since this warning occured.

Application works just fine though, will be waiting for a update, take your time 👍

@lionel-bijaoui
Copy link
Member

Just be careful if you use it in production, this is still technically an alpha (v0.x.x) and API may change a lot.
This is why feedback from user like your is very valuable.
You can also spread the word about this plugin.
We need help for accessibility related issue #74 , and we don't have any experience about it. Someone who know about this would be super helpful. Just saying !

@icebob icebob added the bug label Sep 29, 2016
@Cannonb4ll
Copy link
Author

I have been sharing this plugin a lot, actually haha. Didn't knew it was in Alpha! I am planning on using this plugin in a production environment, not a big application but it works just fine to be honest.

I will be looking into your issue as well when I get the time. (#74)

@lionel-bijaoui
Copy link
Member

Thank you !
Don't worry, every release is working, it just that between release, big change might be introduced. We try to minimized that, but we can't guaranty it.

@icebob
Copy link
Member

icebob commented Sep 29, 2016

It is alpha, but working :) We have break changes in releases. So if you would like to use in production, we recommend to lock the version in package.json and update only manually.

@lionel-bijaoui
Copy link
Member

@icebob hive mind! 😄

@icebob icebob added this to the v0.6.0 milestone Oct 1, 2016
@icebob icebob closed this as completed in 58093c7 Oct 6, 2016
icebob added a commit that referenced this issue Oct 6, 2016
@icebob
Copy link
Member

icebob commented Oct 6, 2016

Fixed. Will be released in v0.6.0

lionel-bijaoui pushed a commit to lionel-bijaoui/vue-form-generator that referenced this issue Oct 7, 2016
lionel-bijaoui pushed a commit to lionel-bijaoui/vue-form-generator that referenced this issue Oct 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants