I have dynamically changing data for Vuetify's v-data-table:
<v-data-table
:headers="table_headers"
:items="table_content"
>
</v-data-table>
In the table_headers I can add "class" so that it can be used to apply custom css formatting on the headers:
table_headers: [
{
text: 'Dessert (100g serving)',
align: 'start',
sortable: false,
value: 'name',
class: 'section-dessert'
},
{ text: 'Calories', value: 'calories', class: 'section-calories' },
],
However this only affect headers. So my question is, would it be possible, or what is the best way to apply this class that I keep in table_headers
also to all rows (per respective column).
So that when I write css for given class it will affect both header and all the rows for the given column.
EDIT: So essentially I want to style whole column (on column basis), something like this: Can I color table columns using CSS without coloring individual cells? However with dynamic data for headers and table items (and since vuetify does not have working colgroup then Im not sure how to do something like this here)