I created a component for displaying some information in a nice looking way. This component is just a wrapper for the content, which is rendered inside the parent component. The parent component implements the child component this way:
<my-component v-for="item in items" :key="item.id">
<template slot="header">
{{ item.title }}
</template>
<template slot="meta">
<div>
<template v-if="typeof item.additionalData != 'undefined'">
{{ item.additionalData.text }}
</template>
</div>
</template>
</my-component>
Its working fine, until I want to change the data. items is a variable in the parent component and at render time, the data is parsed in the right way. When I change something inside of items after rendering, the child component doesn't recognize it. The reason is because the item.additionalData is added through an AJAX call after the component was already rendered.
The docs say
Everything in the parent template is compiled in parent scope; everything in the child template is compiled in child scope.
but it seems like this is only true at render time.
Am I not able to use my component this way or is there a solution for that?