I am using bootstrap vue b-table to display my items:
<b-table striped bordered :tbody-tr-class="row_class" :fields="fields" :items="items" head-variant="light" class="o-list"
thead-class="o-gradient-header"
@row-selected="onRowSelected" selectable
no-local-sorting @sort-changed="change_sort" :sort-by="list_options.sort"
:sort-desc="list_options.order==='desc'">
...
</b-table>
I want to change the background color of each cell based on a function call:
row_class(item) {
// Insert conditionals
// return CSS class string
}
But this is changing the style of the entire row. I don't want that. I only want to change the style of the cell? Is there a way I can change each cell background color?