Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(VDataTable): always allow expand groupby #18536

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

Esgator
Copy link
Contributor

@Esgator Esgator commented Oct 24, 2023

added groupExpanded prop to allow to always render group rows expanded

Description

I added a prop to all VDataTables to pass along with groupBy to make the groups always expand when set.

Markup:

<template>
  <v-app>
    <v-container>
      <v-data-table
        :group-by="groupBy"
        :group-Expanded="groupExpanded"
        :headers="headers"
        :items="desserts"
        :sort-by="sortBy"
        class="elevation-1"
        item-value="name"
      ></v-data-table>
    </v-container>
  </v-app>
</template>

<script>
  export default {
    name: 'Playground',
    data: () => ({
      sortBy: [{ key: 'name', order: 'asc' }],
      groupBy: [{ key: 'dairy', order: 'asc' }],
      groupExpanded: true,
      headers: [
        {
          title: 'Dessert (100g serving)',
          align: 'start',
          key: 'name',
          groupable: false,
        },
        { title: 'Category', key: 'category', align: 'end' },
        { title: 'Dairy', key: 'dairy', align: 'end' },
      ],
      desserts: [
        {
          name: 'Frozen Yogurt',
          category: 'Ice cream',
          dairy: 'Yes',
        },
        {
          name: 'Ice cream sandwich',
          category: 'Ice cream',
          dairy: 'Yes',
        },
        {
          name: 'Eclair',
          category: 'Cookie',
          dairy: 'Yes',
        },
        {
          name: 'Cupcake',
          category: 'Pastry',
          dairy: 'Yes',
        },
        {
          name: 'Gingerbread',
          category: 'Cookie',
          dairy: 'No',
        },
        {
          name: 'Jelly bean',
          category: 'Candy',
          dairy: 'No',
        },
        {
          name: 'Lollipop',
          category: 'Candy',
          dairy: 'No',
        },
        {
          name: 'Honeycomb',
          category: 'Toffee',
          dairy: 'No',
        },
        {
          name: 'Donut',
          category: 'Pastry',
          dairy: 'Yes',
        },
        {
          name: 'KitKat',
          category: 'Candy',
          dairy: 'Yes',
        },
      ],
    }),
  }
</script>
Soeren Lerch and others added 2 commits October 24, 2023 16:09
added groupExpanded prop to allow to always render group rows expanded
@MajesticPotatoe MajesticPotatoe added T: bug Functionality that does not work as intended/expected C: VDataTable VDatatable labs labels Oct 25, 2023
@nekosaur
Copy link
Member

Thank you for the PR and your interest in improving Vuetify. Unfortunately this is not how we plan to introduce this functionality.

@Esgator
Copy link
Contributor Author

Esgator commented Nov 9, 2023

Thank you for the PR and your interest in improving Vuetify. Unfortunately this is not how we plan to introduce this functionality.

Thanks for your response. Is it short term planned or can you share some informations how it should be done so i might help?

@SystemKeeper
Copy link

@nekosaur Are there any information available on how this should be implemented? I would be interested in having this as well and would be open to contribute.

@Employee87
Copy link

Me too, but also, I would like to control which specific groups are expanded by default too, and to control them via a boolean.

@SystemKeeper
Copy link

@nekosaur @johnleider Any chance to get some information on this so we could contribute the feature? (Or help in another way?)

@johnleider
Copy link
Member

Right now we need a champion for the Data Table component. Albert is currently inactive.

@SystemKeeper
Copy link

Any idea how can get this into a mergable state?

@johnleider johnleider added S: stale This issue is untriaged and hasn't seen any activity in at least six months. and removed labs labels Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VDataTable VDatatable S: stale This issue is untriaged and hasn't seen any activity in at least six months. T: bug Functionality that does not work as intended/expected
6 participants