Skip to content

fix(defaults): avoid parent config leaking into menu and dialog content#23016

Open
J-Sek wants to merge 2 commits into
devfrom
fix/defaults-nested
Open

fix(defaults): avoid parent config leaking into menu and dialog content#23016
J-Sek wants to merge 2 commits into
devfrom
fix/defaults-nested

Conversation

@J-Sek

@J-Sek J-Sek commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

fixes #18123

Markup:

// defaults.js
export default {
  VTextField: { variant: 'outlined' },
  VTable: {
    VTextField: { variant: 'solo' },
  },
}
<template>
  <v-app theme="dark">
    <v-container>
      <v-sheet>
        <h2>With No VDefaultsProvider (Expected Code)</h2>
        <v-table>
          <tbody>
            <tr>
              <td>
                <v-text-field placeholder="plain" />
              </td>
              <td>
                <v-dialog>
                  <template #activator="{ props }">
                    <v-btn v-bind="props">Click</v-btn>
                  </template>
                  <v-card width="300">
                    <v-card-text>
                      <v-text-field placeholder="outlined" />
                    </v-card-text>
                  </v-card>
                </v-dialog>
              </td>
            </tr>
          </tbody>
        </v-table>

        <h2>With An Empty VDefaultsProvider (Workaround)</h2>
        <v-defaults-provider :defaults="{}">
          <v-table>
            <tbody>
              <tr>
                <td>
                  <v-text-field placeholder="plain" />
                </td>
                <td>
                  <v-dialog>
                    <template #activator="{ props }">
                      <v-btn v-bind="props">Click</v-btn>
                    </template>
                    <v-card width="300">
                      <v-card-text>
                        <v-text-field placeholder="outlined" />
                      </v-card-text>
                    </v-card>
                  </v-dialog>
                </td>
              </tr>
            </tbody>
          </v-table>
        </v-defaults-provider>
      </v-sheet>
    </v-container>
  </v-app>
</template>

<script setup>
  import { ref } from 'vue'

  const work = ref('it works')
  const notwork = ref('it doesnt work')

  const workItems = ref(['it', 'works', 'fine'])
  const notWorkItems = ref(['it', 'doesnt', 'work'])
</script>

@J-Sek J-Sek self-assigned this Jul 16, 2026
@J-Sek J-Sek added T: bug Functionality that does not work as intended/expected E: defaults Defaults composable labels Jul 16, 2026
@J-Sek J-Sek linked an issue Jul 16, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

E: defaults Defaults composable 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.3.14] Global Defaults Passing Through Modals

1 participant