Skip to content

Conversation

@prestonyford
Copy link

fixes #22288
When in mobile view of a VDataTable, makes it so clicking an option in the sort by dropdown sorts the option (instead of only adding the chip but not sorting yet)

Description

This change lets the user sort with one click, instead of two (one to create the chip, the other to click on the chip)

Markup:

<template>
  <v-app>
    <v-container>
      <v-btn @click="multiSort = !multiSort">toggle multi-sort</v-btn>
      <v-data-table :items="items" :headers="headers" :multi-sort="multiSort" mobile></v-data-table>
    </v-container>
  </v-app>
</template>

<script>
  export default {
    data(){
      return {
        items: [{a:1, b:4, c: 5}, {a:2, b:3, c:6}],
        headers: [{key: "a", title: "Col A"}, {key: "b", title: "Col B"}, {key: "c", title: "Col C"}],
        multiSort: false
      }
    }
  }
</script>

@J-Sek J-Sek changed the title fix(VTreeView): mobile view sort-by default to ascending fix(VDataTable): mobile view sort-by default to ascending Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug Report][3.10.8] v-data-table mobile view sort-by first selection not sorting, was working in v2

1 participant