1

I have a simple v-tab with router link :

        <v-tab>            

          <router-link
            class="normalize font-weight-bold"
            to="/docs"
            >
            Docs
          </router-link>

        </v-tab>      

Problem:
The link works only when clicked exactly on the text 'Docs'. I want to be able to switch tabs when clicked on the tab area for a better UX. How should I edit the code such that the user can switch tabs when s/he clicks on the tab area ?

newbnoob
  • 63
  • 1
  • 9
  • 1
    I believe you should move the routing into the tab like this `Docs` See https://stackoverflow.com/a/49721711/14072498 – Roar S. Jul 21 '21 at 21:57
  • 1
    Thanks ! This solved my problem. Please add your comment as a reply so I can mark it as the correct answer. – newbnoob Jul 22 '21 at 08:00

1 Answers1

1

I believe you should move the routing into the tab like this

<v-tab to="/docs">Docs</v-tab> 

See also this question for related information: https://stackoverflow.com/a/49721711/14072498

Roar S.
  • 8,103
  • 1
  • 15
  • 37