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

Error when evaluating setter #1378

Closed
jasonvarga opened this issue Sep 30, 2015 · 1 comment
Closed

Error when evaluating setter #1378

jasonvarga opened this issue Sep 30, 2015 · 1 comment

Comments

@jasonvarga
Copy link

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.

@jasonvarga
Copy link
Author

Thank you!!

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

2 participants