I want to change group label of vuetify data-table. For earlier versions of Vuetify below the code was working fine but now it doesn’t work.
<va-data-table-server
:items-per-page="50"
:group-by="groupBy"
row-create
row-clone
row-edit
disable-edit
disable-show
disable-clone
disable-create-redirect
>
<template v-slot:column.data-table-group>
</template>
</va-data-table-server>
Here is demo link.
2
Answers
Use header slot
The key for the "Group" header is
data-table-group
(found by first using theheaders
slot and printing all column data to the UI: seen here), so the actual slot you need to use isheader.data-table-group
Vuetify Playground
You can add a header declaration with the key
data-table-group
to your headers array:This also allows you to move the group column in the table.
playground