This is my component (let's call it BaseTable):
<v-card>
<v-card-title>
{{ title }}
<v-spacer></v-spacer>
<v-text-field
:value="value"
@input="$emit('input', $event)"
append-icon="mdi-magnify"
label="Search"
single-line
hide-details
></v-text-field>
</v-card-title>
<v-data-table
:search="value"
:headers="headers"
:items="items"
:loading="loading"
:loading-text="loadingText"
>
<slot></slot> <!--Will pass something here -->
</v-data-table>
</v-card>
</template>
Then I want to reuse BaseTable like this with a button in Actions column:
<BaseTable
:headers="headers"
:items="items"
:loading="loading"
loadingText="Getting items... Please wait"
title="Transfer Request Processing"
v-model.lazy="search"
>
<template v-slot:item.actions="{ item }">
<v-btn block color="warning" outlined @click="delete(item)">
<v-icon left class="mr-2">mdi-icon</v-icon>DELETE
</v-btn>
</template>
</BaseTable>
Data are displayed with proper headers but the 'DELETE' button does not. I tried using the template on the component itself (which works fine), but I don't want it that way. Thank you much for any help.