Skip to content

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

@kiranoot

Description

@kiranoot

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/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions