I am currently using Vue-datatable, where I have a generic vue component as . I am using this base component to render data table and I have a @click event in the in the element. but as I use this component in various places I want the @click event to be overridden so that, I could call the diffenent method as per my need.
the below file is BaseTable.vue
<v-app id="inspire">
<v-data-table
v-model="selected"
:headers="headers"
:items="desserts"
:pagination.sync="pagination"
select-all
item-key="name"
class="elevation-1"
>
<template v-slot:headers="props">
<tr>
<th>
<v-checkbox
:input-value="props.all"
:indeterminate="props.indeterminate"
primary
hide-details
@click.stop="toggleAll"
></v-checkbox>
</th>
<th
v-for="header in props.headers"
:key="header.text"
:class="['column sortable', pagination.descending ? 'desc' : 'asc', header.value === pagination.sortBy ? 'active' : '']"
@click="changeSort(header.value)"
>
<v-icon small>arrow_upward</v-icon>
{{ header.text }}
</th>
</tr>
</template>
<template v-slot:items="props">
<tr :active="props.selected" @click="props.selected = !props.selected">
<td>
<v-checkbox
:input-value="props.selected"
primary
hide-details
></v-checkbox>
</td>
<td>{{ props.item.name }}</td>
<td class="text-xs-right">{{ props.item.calories }}</td>
<td class="text-xs-right">{{ props.item.fat }}</td>
<td class="text-xs-right">{{ props.item.carbs }}</td>
<td class="text-xs-right">{{ props.item.protein }}</td>
<td class="text-xs-right">{{ props.item.iron }}</td>
</tr>
</template>
</v-data-table>
</v-app>
</template>```
Could I possibly override the triggercall method shown above in the code?
Thanks.