If you're looking to customize table rows, there are two ways you can approach it.
Method 1: Customize the Entire Row
If you want to customize the entire row within the table header, this method could be helpful. However, keep in mind that customizing this way may cause you to lose the default sorting functionality of the v-data-table component.
Example:
<template v-slot:header="{ props: { headers } }">
<thead>
<tr>
<th v-for="h in headers">
<v-tooltip bottom>
<template v-slot:activator="{ on }">
<span v-on="on">{{h.text}}</span>
</template>
<span>{{h.text}}</span>
</v-tooltip>
</th>
</tr>
</thead>
</template>
You can see a working example here: https://codepen.io/onelly/pen/QWWmpZN
Method 2: Customize Each Heading While Maintaining Sorting Functionality
If you prefer to customize each heading individually without sacrificing the sorting functionality, this method is likely more suitable. By utilizing Dynamic Slot Names, you can achieve this easily.
Example:
<template v-for="h in headers" v-slot:[`header.${h.value}`]="{ header }">
<v-tooltip bottom>
<template v-slot:activator="{ on }">
<span v-on="on">{{h.text}}</span>
</template>
<span>{{h.text}}</span>
</v-tooltip>
</template>
Check out a live demo of this implementation here: https://codepen.io/onelly/pen/ExxEmWd