Skip to content

Error when evaluating setter #1378

@jasonvarga

Description

@jasonvarga

Hi, I posted this question in the forum, but have now thought about it a little more and it seems to me like its probably a bug so I'm posting here.

The essence is that when binding a prop to an element in an object using square brackets, it fails.

The examples I posted in there didn't work when using simple text/textarea fields. We noticed that it did work when using a more complicated table field. Maybe it has something to do with using a string vs. an object as the value.

I've updated the fiddle to illustrate this with a table fieldtype.
http://jsfiddle.net/9o5xjr0p/6/

Editing the cells in the table fieldtype works fine. Editing the text/textarea fields results in [Vue warn]: Error when evaluating setter "fieldData[field.name]".

Another thing to note is in this line:

<component :is="field.type + '-fieldtype'" :field-data.sync="fieldData[field.name]"></component>

If I hardcode the object's key, it works fine. eg. :field-data.sync="fieldData['foo']". But obviously this doesn't solve the issue :)

This all worked in 0.12. If you can point me in the right direction that would be fantastic.

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