vuetify icon indicating copy to clipboard operation
vuetify copied to clipboard

[Bug Report][3.1.9] inline styling of table rows in the item slot no longer works

Open lukasrossa opened this issue 1 year ago • 5 comments

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

https://codepen.io/lukasrossa/pen/poOLMGw

lukasrossa avatar Mar 15 '23 01:03 lukasrossa

The default background-color is now on td instead of .v-data-table

KaelWD avatar Mar 15 '23 04:03 KaelWD

@KaelWD so what does that mean for wanting to style just rows in a table? Doing it by cell seems inefficient?

lukasrossa avatar Mar 15 '23 08:03 lukasrossa

@nekosaur can you provide your feedback?

johnleider avatar Mar 15 '23 17:03 johnleider

I can't say for sure, but might have put it on td so that I can do fixed headers and columns?

nekosaur avatar Mar 15 '23 17:03 nekosaur

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

ZakareyaAlatoli avatar Mar 16 '23 12:03 ZakareyaAlatoli