I'm trying to do something like this in a BV table to send the result of a row click to a parent component using the row-clicked event:
<template>
<div>
<b-table :items='totals' selectable select-mode='single' hover @row-clicked='rowClicked'></b-table>
</div>
</template>
<script>
export default {
data: function() {
return { }
},
props: ['totals'],
methods: {
rowClicked(rowData) {
this.$emit("filter-total", rowData.total)
}
}
}
</script>
The $emit works fine, but seems to prevent the row-selected event, as the row never gets selected (which is confusing for the user). If I replace the $emit with something else, the row is selected correctly.
Why is this happening and how can I prevent it?