I have got a Vuetify 2 data table which uses default select and expand functionality. So I get the expand icon in the first column, select boxes in the 2nd column from left.
What I need is to show these columns in switched order: 1st column -> select box, 2nd column -> expand icon.
Is there any easy way to achieve that without implementing the select functionality on my own?
<v-data-table
:headers="headers"
:items="items"
show-select
show-expand
item-key="id"
>
<template v-slot:expanded-item="{ item }">
<td :colspan="headers.length+2">{{ item }}</td>
</template>
</v-data-table>
In your header list, add column declarations with
value
set todata-table-select
anddata-table-expand
to set the position of the select column and expand column:Here it is in a snippet: