Add custom class in q-markup-table ?
-
-
You have a
table-class
in Q-Table APIhttps://quasar.dev/vue-components/table#QTable-API
-
@keload Q-table != Q-markup-table
-
ok sorry, actually no props are propagated on the element “table”.
So what I’ll do, I’ll apply the style from the parent
.parent-class > table
. -
@jitendra16 you could use css style to target the parent customclass with child q-table like:
.customClass > table { color: red }
-
@dobbel Actually i need to access ‘table’ element by document.getElementsByClassName() in a custom component used for exporting table into CSV.
-
why not create an csv export of the
data
you use to create the table instead of the table itself? -
@dobbel not only CSV but pdf and print also done by component.
-
how about this:
document.getElementsByClassName("customClass").firstElementChild
or firstChild