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

.sync modifier doesn't work for deeply nested object in a v-for #8373

Closed
jacobgoh101 opened this issue Jun 19, 2018 · 3 comments
Closed

.sync modifier doesn't work for deeply nested object in a v-for #8373

jacobgoh101 opened this issue Jun 19, 2018 · 3 comments

Comments

@jacobgoh101
Copy link

@jacobgoh101 jacobgoh101 commented Jun 19, 2018

Version

2.5.16

Reproduction link

https://jsfiddle.net/jacobgoh101/g5bv0esd/1/

Steps to reproduce

Using .sync modifier for an array of objects in a v-for loop

What is expected?

.sync modifier should update parent's data

What is actually happening?

.sync modifier doesn't update parent's data


Manually adding events handler works. But .sync modifier doesn't.

@javoski
Copy link
Member

@javoski javoski commented Jun 19, 2018

It should be $emit('update:itemAttribute', value), see https://jsfiddle.net/g5bv0esd/5/

@javoski javoski closed this Jun 19, 2018
@feliperaul
Copy link

@feliperaul feliperaul commented Jun 20, 2018

@javoski Please consider re-opening. The official guide, in the same section where the .sync is documented, states:

... we recommend you always use kebab-case for event names.

This has bitten me as well. Either the docs needs fixing or the code does.

@sodatea
Copy link
Member

@sodatea sodatea commented Jun 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants