Closed
Description
I have something like this:
...
<b-table :items="products_cart" :fields="fields">
<template slot="actions" scope="data">
...
</template>
</b-table>
....
props: ['products_cart'],
data() {
return {
fields: [
{
key: 'name',
label: 'Name',
sortable: true
},
{
key: 'qtd',
label: 'Quantity',
sortable: true
},
{
key: 'total_price',
label: 'Total',
sortable: true,
formatter: (value, key, item) => {
return item.qtd * item.value;
}
},
{
key: 'actions',
label: 'Actions'
}
],
}
},
...
It's working great, except the sortable on the formated column, the total_price. Any ideias why? And/or can I solve this?