I render Vue components using v-for
:
<component
v-for="component in components"
:is="component.type"
@click="myFunction(component.id)">
</component>
Clicking on the rendered component doesn't fire the myFunction
method. However, clicking a manually inserted component does:
<div @click="myFunction('...')"></div>
How to correct this?