here my code :
<b-table
hover
:items="usergroupTable.datas"
:fields="usergroupTable.fields"
:sort-by.sync="sortBy"
:sort-desc.sync="sortDesc"
responsive="sm"
>
<template #cell(edit)="data">
<b-button @click="editItem(data.id)">Delete</b-button>
<b-button @click="editItem(data.id)">Edit</b-button>
</template>
</b-table>
Here my datas :
data() {
return {
usergroupTable: {
filter: null,
fields: [
'edit',
{ key: 'usergroupname', label:'User Group Name' , sortable: true},
{ key: 'product', label:'Product' , sortable: true},
{ key: 'seatslimits', label:'Seats Limit' , sortable: true},
{ key: 'expirationdate', label:'Expiration Date' , sortable: true},
{ key: 'lastpayment', label:'Last Payment' , sortable: true},
{ key: 'nextpayment', label:'Next Payment' , sortable: true},
],
datas: [
{ id: 5 ,usergroupname: 'IUT Bordeaux', product: 'Light', seatslimits: '20', expirationdate: '2021/08/01', lastpayment: '', nextpayment: '' },
{ id: 8, usergroupname: 'Admins', product: 'God', seatslimits: '', expirationdate: '', lastpayment: '', nextpayment: '' }
],
}
}
},
I try to have add and editing button each row, but now Edit column is empty, i don't see my buttons.
Anyone have an idea of the problem ? Thanks !
<template v-slot:cell(edit)="data">VueandBootstrapVueare you using?2.0.0or2.0.0-rc.xx?