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(VTabs): correctly set active state with exact prop #14500

Merged
merged 1 commit into from Dec 27, 2021

Conversation

Florent-Bouisset
Copy link
Contributor

@Florent-Bouisset Florent-Bouisset commented Dec 11, 2021

The v-tabs component didn't move the slider if the v-tab had the property "exact"

Description

After investigating, it came from the mixin routable,
The value of "exactActiveClass" was not checked before assigning to the path, resulting in

'_vnode.data.class.undefined
I change the code to fall back on proxyClass if exactActiveClass is undefined
As a precaution I did the same for activeClass even if it's not needed for resolving this issue

the bug was introduced by PR #14207

Motivation and Context

Resolves #14431
Resolves #14459

How Has This Been Tested?

didn't add unit tests

Markup:

Playground.vue

<template>
  <v-container>
    <v-tabs>
      <v-tab
        to="/page1"
      >page1</v-tab>
      <v-tab
        to="/page2"
      >page2</v-tab>
    </v-tabs>
    <v-btn to="/page2">Go to page 2</v-btn>
  </v-container>
</template>

<script>
  export default {
    data: () => ({
    }),
  }
</script>

Types of changes

  • [x ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement/refactoring (non-breaking change that doesn't add any features but makes things better)

Checklist:

  • [ x] The PR title is no longer than 64 characters.
  • [ x] The PR is submitted to the correct branch (master for bug fixes and documentation updates, dev for new features and backwards compatible changes and next for non-backwards compatible changes).
  • [ x] My code follows the code style of this project.
  • [ x] I've added relevant changes to the documentation (applies to new features and breaking changes in core library)

@KaelWD KaelWD changed the title fix(v-tab): fix slider on v-tab with props "exact" fix(VTabs): correctly set active state with exact prop Dec 27, 2021
@KaelWD KaelWD merged commit 74ec950 into vuetifyjs:master Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants