Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

333
Views
How to manage an active class <v-tabs> in Vuetify

I have <v-tabs> this kind:

<v-tabs
            fixed-tabs
            centered
            align-with-title
            height="55"
            class="d-flex align-end justify-center mt-0"
        >
          <v-tabs-slider color="pink" v-show="(searchClosed && !search)"></v-tabs-slider>
          <v-tab :disabled="!searchClosed" :to="{ name : 'home' }">Home</v-tab>
          <v-tab :disabled="!searchClosed" :to="{ name : 'premiers' }">Premiers</v-tab>
          <v-menu offset-y bottom max-height="500" v-model="genresMenu">
            <template v-slot:activator="{ on, attrs }">
              <v-tab @click="genresMenu = !genresMenu" bind="attrs" v-on="on">Genres</v-tab>
            </template>
            <v-list
                nav
                rounded
                max-width="800"
                align="center"
            >
              <v-list-item
                  v-for="genre in genres"
                  :key="genre.id"
                  :to="{ name : 'genre', params: { id: genre.id }}"
              >
                <v-list-item-title>{{ genre.name }}</v-list-item-title>
              </v-list-item>
            </v-list>
          </v-menu>
        </v-tabs>

The active class switches between the Home / Premiers tab as needed, but when you click on the link on the Genre tab, the active class is updated and returned to the Home tab. Can I somehow keep the Genre tab active after following the link inside v-list-item? Example path: /genre/1

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Try this

<template v-slot:activator="{ on, attrs }">
  <v-tab >
    <div @click="genresMenu = !genresMenu" bind="attrs" v-on="on">Genre</div>
  </v-tab>
</template>
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!