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

Incorrect warning about two-way bind on v-for alias with filters not working. #1778

Closed
kiranoot opened this issue Nov 9, 2015 · 0 comments
Closed

Comments

@kiranoot
Copy link

kiranoot commented Nov 9, 2015

In Vue 1.0.x there is a new warning issued for attempting to write to a v-for alias when using a filter, warning that it will not work correctly. This warning goes off even when you follow the advice given and bind against object parameters, and more confusingly, if the alias appears anywhere in the expression, even if it not being written to at all.

Warning on reading value from v-for alias:
[Vue warn]: It seems you are using two-way binding on a v-for alias (items[item.id].name), and the v-for has filters. This will not work properly. Either remove the filters or use an array of objects and bind to object properties instead.

Warning when binding to an object property.
[Vue warn]: It seems you are using two-way binding on a v-for alias (item.name), and the v-for has filters. This will not work properly. Either remove the filters or use an array of objects and bind to object properties instead.

Example: https://jsfiddle.net/eq7fpy5k/1/

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

No branches or pull requests

1 participant