Hello, I have a question about deleting an item or row in a b-table. I attempted to delete the item by using
@click.prevent="deleteCustomItem(data.data.item)
, but I encountered issues because I am in strict mode.
Here is my table setup:
<custom-item-grid ref="customItemGrid" :is-busy="gridIsBusy" :key="invoice.id" :fields="gridItemsFields" :items="gridCustomItems">
<template slot="action-buttons" slot-scope="data">
<b-button v-b-tooltip.hover title="{{ __('Odstranit vlastní položku') }}" variant="danger" @click.prevent="deleteCustomItem(data.data.item)"><i class="fa fa-times"></i></b-button>
</template>
</custom-item-grid>
Here is the deleteCustomItem function:
deleteCustomItem(item) {
console.log(item);
this.showConfirmDialog('Delete', 'Are you sure?').then(value => {
if (value === true) {
//CODE HERE
}
});
}