Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vuetify change text Rows per page text in v-data-table's footer

I'm working with v-data-tables of Vuetify and....

I want to change this text:

enter image description here

I have added this code but it isn't working:

enter image description here

Thanks!

like image 266
Nacho Avatar asked Jun 08 '20 10:06

Nacho


3 Answers

You could use 'items-per-page-text':'products per page' :

  <v-data-table
      :headers="headers"
      :items="desserts"
      :items-per-page="5"
      item-key="name"
      class="elevation-1"
      :footer-props="{
        showFirstLastPage: true,
        firstIcon: 'mdi-arrow-collapse-left',
        lastIcon: 'mdi-arrow-collapse-right',
        prevIcon: 'mdi-minus',
        nextIcon: 'mdi-plus',
           'items-per-page-text':'products per page'
      }"
    ></v-data-table>

Please check this example

like image 106
Boussadjra Brahim Avatar answered Oct 01 '22 02:10

Boussadjra Brahim


The correct prop for vuetify 2.X is items-per-page-text:

<v-data-table
      :footer-props="{itemsPerPageText: 'Rows count'}"
></v-data-table>
like image 36
Alexander Shkirkov Avatar answered Oct 01 '22 04:10

Alexander Shkirkov


<template v-slot:[`footer.page-text`]="items"> 
  {{ items.pageStart }} - {{ items.pageStop }} de {{ items.itemsLength }}
</template>
like image 20
Edilson Vieira Avatar answered Oct 01 '22 03:10

Edilson Vieira