Vuetify: [Enhancement] Datatable select-all disable

Created on 23 Oct 2018  路  7Comments  路  Source: vuetifyjs/vuetify

What problem does this feature solve?



This is a simple request I can't disable the select-all option on datatables

image
As you can see on the checkbox I have the option, but not on the select-all button

What is your proposed solution?



image

VDataTable enhancement

Most helpful comment

This is veering into OT, but one way to make that a little bit more readable would be to

  1. use the shorthand : instead of v-bind:
  2. put each prop on a new row

All 7 comments

We need a better way to customize the select-all checkbox than littering the data-table with more props. This is something I'm looking at for the 2.0 refactor.

Haha tell me about it. Look at this
<v-autocomplete v-model="vAutocompleteModelo.select" v-bind:items="vAutocompleteModelo.modelos" v-bind:loading="vAutocompleteModelo.isLoading" v-bind:search-input.sync="vAutocompleteModelo.search" label="Buscar Modelo de Producto" item-text="nombre" :chips="true" browser-autocomplete="off" hint="Ingresa por lo menos 3 caracteres" hide-no-data hide-selected return-object></v-autocomplete>

It's a great idea to think about changing this. Maybe using some configuration object

And btw thanks. It's by far the best framework for Vue

This is veering into OT, but one way to make that a little bit more readable would be to

  1. use the shorthand : instead of v-bind:
  2. put each prop on a new row

yep I know. it's just that the project is a little bit big and there are some conventions

The solution for now is to not use select-all, put a dummy header for replacement instead.

select-all checkbox is customizable in 2.0 with slot header.data-table-select

I would recommend that you use the slot header header.data-table-select to disable the select all

<v-data-table show-select v-model="selected" :headers="headers" :items="items" :items-per-page="15" class="elevation-1"> <template v-slot:header.data-table-select> </template> </v-data-table>

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ricardovanlaarhoven picture ricardovanlaarhoven  路  3Comments

milleraa picture milleraa  路  3Comments

paladin2005 picture paladin2005  路  3Comments

dohomi picture dohomi  路  3Comments

Webifi picture Webifi  路  3Comments