Vuetify data table :item-class do nothing

Tags: , , ,

I’m really confused by “:item-class” prop in Vuetify (v. 2.3.4) data table. It does nothing even if I try to add a static text class.

<v-data-table class="mt-10"

It just renders tr tags without any class:

enter image description here

Do you know why? I think it worked some time ago and I haven’t changed Vuetify (2) version.


item-class does not specify the CSS classes directly. If it is a String – then it specifies the property inside the item’s Object which contains the CSS class(es). If it is a Function – then it gets the item as its argument and must return the CSS class(es).

Source: stackoverflow