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

[Bug Report][3.6.12] v-btn-toggle in variant="plain" does not show default value as selected #20142

Closed
preiaen opened this issue Jul 11, 2024 · 0 comments · Fixed by #20279
Closed
Labels
C: VBtn VBtn T: bug Functionality that does not work as intended/expected
Milestone

Comments

@preiaen
Copy link

preiaen commented Jul 11, 2024

Environment

Vuetify Version: 3.6.12
Vue Version: 3.4.27
Browsers: Firefox 128.0
OS: Windows 10

Steps to reproduce

In case the play.vuetifyjs.com link doesn't work the following script shows the issue:

<template>
  <v-container>
    <v-row>
      <v-col class="py-2" cols="12" sm="6">
        <p>Mandatory</p>
        <v-btn-toggle v-model="toggle_one">
          <v-btn value="eins">
            <v-icon>mdi-format-align-left</v-icon>
          </v-btn>

          <v-btn value="zwei">
            <v-icon>mdi-format-align-center</v-icon>
          </v-btn>

          <v-btn value="drei">
            <v-icon>mdi-format-align-right</v-icon>
          </v-btn>

          <v-btn value="vier">
            <v-icon>mdi-format-align-justify</v-icon>
          </v-btn>
        </v-btn-toggle>
      </v-col>

      <v-col class="py-2" cols="12" sm="6">
        <p>Mandatory</p>
        <v-btn-toggle v-model="toggle_one" variant="plain">
          <v-btn value="eins">
            <v-icon>mdi-format-align-left</v-icon>
          </v-btn>

          <v-btn value="zwei">
            <v-icon>mdi-format-align-center</v-icon>
          </v-btn>

          <v-btn value="drei">
            <v-icon>mdi-format-align-right</v-icon>
          </v-btn>

          <v-btn value="vier">
            <v-icon>mdi-format-align-justify</v-icon>
          </v-btn>
        </v-btn-toggle>
      </v-col>
    </v-row>
  </v-container>
</template>

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

  const toggle_one = ref('vier')
</script>

Expected Behavior

The expected behavior would be, that the fourth element in plain variant is bold or in a different color, like it is, when one actualy clicks on it.

Actual Behavior

The regular variant shows the fourth element as selected while the plain variant does not.

Reproduction Link

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

@KaelWD KaelWD added T: bug Functionality that does not work as intended/expected C: VBtn VBtn labels Jul 11, 2024
@KaelWD KaelWD added this to the v3.7.x milestone Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VBtn VBtn T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants