The label is visible only in the mobile view at the top of the v-data-table
. I've read the documentation and there's no such a prop that can modify the "Sort by" label.
We can easily do this by adding headerProps
to the data
option like:
new Vue({
el: '#app',
vuetify: new Vuetify(),
data () {
return {
headerProps: {
sortByText: "Custom Sort By Text"
},
headers: [
//...
],
items: [
//...
]
}
},
})
and then updating the template like:
<v-data-table
:headers="headers"
:items="items"
:items-per-page="5"
class="elevation-1"
:header-props="headerProps"
>
</v-data-table>
Now, in mobile view instead of showing default "Sort by"
label, it will show "Custom Sort By Text"
and you can modify it as you need.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With