-
Hello everyone, I'm currently trying modify item template in v-data-table but the first row and only the first one doesn't apply style from class. <template>
<div id="list">
<v-data-table
:headers="headers"
:items="items"
>
<template
v-slot:item="{ item }"
>
<tr
class="data-table-item-class"
:style="{ backgroundColor: item.color }"
@click="handle_click(item.id)"
>
<td>{{ item.a }}</td>
<td>{{ item.b }}</td>
<td>{{ item.c }}</td>
<td>{{ item.d }}</td>
<td>{{ item.e }}</td>
<td>{{ item.f }}</td>
<td>{{ item.g }}</td>
<td>{{ item.h }}</td>
</tr>
</template>
</v-data-table>
</div>
</template> Thanks for your help ! |
Beta Was this translation helpful? Give feedback.
Answered by
LShadal
Aug 3, 2021
Replies: 1 comment
-
Seems like I fixed it by removing |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
LShadal
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Seems like I fixed it by removing
scoped
from style section on .Vue file