Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vuetify data table mobile breakpoint

I have this vuetify data-table and I Want keep the same behavior on mobile resizing. So I just want all in data on the same line.

https://codepen.io/sebastiancz/pen/JjoVRVg?editable=true&editors=101

<div id="app">
  <v-app id="inspire">
    <v-data-table
      :headers="headers"
      :items="desserts"
      :items-per-page="5"
      class="elevation-1"
    ></v-data-table>
  </v-app>
</div>
new Vue({
  el: '#app',
  vuetify: new Vuetify(),
  data () {
    return {
      headers: [
        {
          text: 'Dessert (100g serving)',
          align: 'left',
          sortable: false,
          value: 'name',
        },
        { text: 'Calories', value: 'calories' },
        { text: 'Fat (g)', value: 'fat' },
        { text: 'Carbs (g)', value: 'carbs' },
      ],
      desserts: [
        {
          name: 'Frozen Yogurt',
          calories: 159,
          fat: 6.0,
          carbs: 24
        },
        {
          name: 'Ice cream sandwich',
          calories: 237,
          fat: 9.0,
          carbs: 37
        }
      ],
    }
  },
})
like image 693
TheDevGuy Avatar asked Jan 01 '23 08:01

TheDevGuy


1 Answers

You can use the mobile-breakpoint prop to configure this. Value of 0 seems to disable different mobile rendering.

<v-data-table
      :headers="headers"
      :items="desserts"
      :items-per-page="5"
      class="elevation-1"
      mobile-breakpoint="0"
    ></v-data-table>
like image 126
Beyers Avatar answered Jan 14 '23 23:01

Beyers