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

fix(VDataTable): correctly update the value of showSelectAll #19762

Merged
merged 2 commits into from
May 7, 2024

Conversation

lzl0304
Copy link
Contributor

@lzl0304 lzl0304 commented May 7, 2024

Description

fixes #19069

Markup:

<template>
  <v-btn @click="strategy='single'">single</v-btn>
  <v-btn @click="strategy='page'">page</v-btn>
  <v-btn @click="strategy='all'">all</v-btn>

  <pre class="pt-2">{{ strategy}}</pre>

  <v-data-table
    v-model="selected"
    :items="items"
    :select-strategy="strategy"
    item-value="name"
    show-select
  />
</template>

<script>
  export default {
    data () {
      return {
        strategy: 'page',
        selected: [],
        items: [
          {
            name: '🍎 Apple',
            location: 'Washington',
            height: '0.1',
            base: '0.07',
            volume: '0.0001',
          },
          {
            name: '🍌 Banana',
            location: 'Ecuador',
            height: '0.2',
            base: '0.05',
            volume: '0.0002',
          },
          {
            name: '🍇 Grapes',
            location: 'Italy',
            height: '0.02',
            base: '0.02',
            volume: '0.00001',
          },
          {
            name: '🍉 Watermelon',
            location: 'China',
            height: '0.4',
            base: '0.3',
            volume: '0.03',
          },
          {
            name: '🍍 Pineapple',
            location: 'Thailand',
            height: '0.3',
            base: '0.2',
            volume: '0.005',
          },
          {
            name: '🍒 Cherries',
            location: 'Turkey',
            height: '0.02',
            base: '0.02',
            volume: '0.00001',
          },
          {
            name: '🥭 Mango',
            location: 'India',
            height: '0.15',
            base: '0.1',
            volume: '0.0005',
          },
          {
            name: '🍓 Strawberry',
            location: 'USA',
            height: '0.03',
            base: '0.03',
            volume: '0.00002',
          },
          {
            name: '🍑 Peach',
            location: 'China',
            height: '0.09',
            base: '0.08',
            volume: '0.0004',
          },
          {
            name: '🥝 Kiwi',
            location: 'New Zealand',
            height: '0.05',
            base: '0.05',
            volume: '0.0001',
          },
        ],
      }
    },
  }
</script>

@johnleider johnleider merged commit 7c64392 into vuetifyjs:master May 7, 2024
9 of 10 checks passed
@johnleider johnleider added this to the v3.6.x milestone May 7, 2024
@johnleider johnleider added T: bug Functionality that does not work as intended/expected C: VDataTable VDatatable labels May 7, 2024
@lzl0304 lzl0304 deleted the fix-19069 branch May 23, 2024 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VDataTable VDatatable T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report][3.4.10] Changing select-strategy in DataTable does not update the select all button
2 participants