vuetify
vuetify copied to clipboard
[Bug Report][3.1.9] inline styling of table rows in the item slot no longer works
Environment
Vuetify Version: 3.1.9 Vue Version: 3.2.47 Browsers: Chrome 111.0.0.0 OS: Windows 10
Steps to reproduce
In Vuetify 2.7, inline styles worked on <td> as well as <tr> elements inside the VDataTable's v-slot:
<v-data-table
:headers="headers"
:items="desserts"
item-value="name">
<template v-slot:item="{ item }">
<tr :style=" {backgroundColor: '#ffebee' }">
<td :style=" {backgroundColor: '#e3f2fd' }">{{ item.columns.name }}</td>
<td>{{ item.columns.calories }}</td>
</tr>
</template>
Expected Behavior
In Vuetify 3, only the <td> styling is working while the <tr> seems to be ignored.
Actual Behavior
both detail and rows should be able to be styled
Reproduction Link
The default background-color is now on td
instead of .v-data-table
@KaelWD so what does that mean for wanting to style just rows in a table? Doing it by cell seems inefficient?
@nekosaur can you provide your feedback?
I can't say for sure, but might have put it on td so that I can do fixed headers and columns?
Is there a new way to add inline styling to rows then or is it just not implemented yet?
EDIT: background colors for rows doesn't work but text colors do for some reason