Skip to content

[Bug Report][3.9.0] Contextual defaults for VList and VButton inside VDataTable #21814

@madHamish42

Description

@madHamish42

Environment

Vuetify Version: 3.9.0
Vue Version: 3.5.17
Browsers: Chrome 138.0.0.0
OS: Windows 10

Steps to reproduce

  1. Set the Vuetify defaults to
  defaults: {
    VDataTable: {
      VMenu: {
        VBtn: {
          density: 'compact',
          variant: 'outlined'
        },
        VList: {
          density: 'compact',
          VBtn: {
            variant: 'plain'
          }
        }
      }
    }
  }
  1. Create a v-data-table like this
    <v-data-table
      :items="[{name: 'Ford', please: 'show towel'}]"
      :disable-sort="true"
    >
      <template v-slot:item="{index, item}">
        <tr>
          <td>{{item.name}}</td>
          <td>
            <v-menu>
              <template v-slot:activator="{props}">
                <v-btn v-bind="props">{{item.please}}</v-btn>
              </template>
              <v-list>
                <v-list-item>
                  <v-btn>ListButton 1</v-btn>
                  <v-btn>ListButton 2</v-btn>
                </v-list-item>
              </v-list>
            </v-menu>
          </td>
        </tr>
      </template>
    </v-data-table>

Expected Behavior

After opening the menu

  • the list inside the menu should have densitiy=compact
  • the buttons inside the list should have density=compact and variant=plain

Actual Behavior

After opening the menu

  • the list inside the menu has density=default
  • the buttons inside the list have density=default and variant=elevated

Reproduction Link

https://play.vuetifyjs.com/#...

Other comments

Using VTable instead of VDataTable works as expected.
example with VTable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions