Answer the question
In order to leave comments, you need to log in
How to stop a click event from a sub-component that breaks through despite .stop?
Vuetify v-list-tile elements contain action buttons.
When I made the element a Vue-Router link via the property to
, button clicks also jumped to the router link. Despite the stop modifier:@click.stop="..."
<template>
<v-list-tile :to="'/details/' + id">
<v-list-tile-content>
<v-list-tile-title>{{ title }}</v-list-tile-title>
</v-list-tile-content>
<v-list-tile-action>
<v-btn icon @click.stop="saveas">
<v-icon color="grey lighten-1">save_alt</v-icon>
</v-btn>
</v-list-tile-action>
<v-list-tile-action>
<v-btn icon @click.stop="refresh">
<v-icon color="grey lighten-1">refresh</v-icon>
</v-btn>
</v-list-tile-action>
</v-list-tile>
</template>
to
, the component is rendered inside the anchor tag , which causes clicks on any elements inside it to fire as a link.
What can be done about it? <a>
Answer the question
In order to leave comments, you need to log in
Well, there are 2 options:
1) v-list-tile
Change from to
to @click
and track there already
2) We v-list-tile
have a prop tag
, send a div there, by default it takes from router-link
, and therea
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question