Can someone help me with my HTML issue?
<a href="/someplace">
<div>
<vuecomp></vuecomp>
<span>Click row for more info</span>
</div>
</a>
Following is the Vue component I am working on...
<template>
<div @click.stop="doAction">
</div>
</template>
When doAction
is called, it also triggers the <a href="">
from its parent div.
How can I prevent this behavior?
I want the parent div to remain separate from the component as it is just a table view.
I have tried using @click.stop
and passing doAction(event)
with event.stopPropagation();
, but it doesn't seem to work.
Does anyone have any other suggestions? It seems like a simple thing to have a button on a click row in Vue.js.