samedi 30 juillet 2022

How can I add the parent checkbox to the Vuetify datagrid group table?

When I use the vuetify data datable group feature, the following view is obtained by default.

enter image description here

But I want to add a checkbox to grouped rows and add a parent checkbox to have child rows marked with a single selection.

enter image description here

The default example is available at this address. https://codepen.io/ersin-g-ven-/pen/PoREoNj

<div id="app">
  <v-app id="inspire">
    <h5>Selected: </h5>
    <v-data-table
      v-model="selected"
      :headers="headers"
      :items="desserts"
      item-key="name"
      show-select
      @click:row="handleClick"
      group-by="category"
      class="elevation-1"
      show-group-by
    >
     
    </v-data-table>
  </v-app>
</div><div id="app">
  <v-app id="inspire">
    <h5>Selected: </h5>
    <v-data-table
      v-model="selected"
      :headers="headers"
      :items="desserts"
      item-key="name"
      show-select
      @click:row="handleClick"
      class="elevation-1"
    >
     
    </v-data-table>
  </v-app>
</div>



Aucun commentaire:

Enregistrer un commentaire