2.5.16
https://jsfiddle.net/jacobgoh101/g5bv0esd/1/
Using .sync modifier for an array of objects in a v-for loop
.sync modifier should update parent's data
.sync modifier doesn't update parent's data
Manually adding events handler works. But .sync modifier doesn't.
It should be $emit('update:itemAttribute', value)
, see https://jsfiddle.net/g5bv0esd/5/
@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.
@feliperaul https://github.com/vuejs/vuejs.org/issues/1648
Most helpful comment
@feliperaul https://github.com/vuejs/vuejs.org/issues/1648