Skip to content
Advertisement

Vuetify data table :item-class doesn’t do anything

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.

JavaScript

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.

Advertisement

Answer

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).

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement