vuetifyjs / vuetify

🐉 Vue Component Framework
https://vuetifyjs.com
MIT License
39.8k stars 6.96k forks source link

[Feature Request] V-data-Table-Server ability to add class to header #16648

Closed websitevirtuoso closed 11 months ago

websitevirtuoso commented 1 year ago

Problem to solve

It extend current structure for table headers Right now we have the next example https://i.imgur.com/sXF1ZHf.png

In my case I would like to set "class" for specific tr and set color, background or make "white-space: nowrap;" or other example. How you will consider as an improvement.

const headers = [
  { title: '#', key: 'id' },
  { title: t('messages.code'), key: 'code' },
  { title: t('messages.discount'), key: 'discount' },
  { title: t('messages.use'), key: 'use', width: 'auto' },
  { title: t('messages.short_description'), key: 'short_description', sortable: false },
  { title: t('messages.rules'), key: 'rules', sortable: false },
  { title: t('messages.created_at'), key: 'created_at', **class: 'white-space: nowrap;'** },
  { title: t('messages.expire_at'), key: 'expire_at' }
]

Proposed solution

Current approach to reach the same is use css and find specific row and apply css rule. But my offer make it more attractive and logical 1 place 1 logic

DezLife commented 1 year ago

When will this be added?*

johnleider commented 1 year ago

We're currently shooting for v3.4