I need to change the text color of each cell in a column within a b-table. I have successfully changed the text color of the column header, but what about the individual cell texts?
Here is the current b-table code:
<b-card title="Total">
<b-table sticky-header="600px" hover :items="total" :fields="groupByFields"></b-table>
</b-card>
The fields where the column header color changes are defined below:
groupByFields: [
{
key: 'name',
sortable: true,
},
{
label: 'Total',
key: 'count',
},
{
key: 'interested',
thStyle: { color: '#3eef33' },
sortByFormatted: false,
formatter: (value) => {
const res = value;
return (`($${res})`);
},
},
],
The thStyle
color attribute only affects the header text color, not the values in the cells of that column. How can I ensure the cell text matches the header text color of that column too?