Taranis
Taranis

Reputation: 344

Vuetify (Vue + Laravel) Navigation bar active link is not set after a router push

I have a quite simple problem but I can't solve it. I used a navigation drawer with a v-list-item-group and the navigation is functioning fine. Just when I use router-link or a this.$router.push() the active link is not changing and stays at the previous site.

For example. When the current site is home and a link from there leading to documentations don't rerender the active-link of the documentations tab and stays on home. If I click it directly in the navigation-bar the active links are set just fine.

enter image description here

I tried following things:

methods:
this.$router.push({
   name: "documentations",
   params: { id: user_id}
});
methods:
this.$router.replace({
   name: "documentations",
   params: { id: user_id}
});

A router link in template with the options exact and exact-path:

<router-link :to="{ name: 'documentations', params: { userId: item.id}}">

Does someone experienced a similiar problem? Did I oversee something crucial?

Upvotes: 0

Views: 519

Answers (1)

Kael Watts-Deuchar
Kael Watts-Deuchar

Reputation: 4491

with a v-list-item-group

v-list-item-group is not supposed to be used with navigation, it's for making selectable lists like this:

1

If you just use v-list + v-list-item it should work.

Upvotes: 1

Related Questions