-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Closed
Description
Vue.js & vue-router.js version
1.0.26, 0.7.13
Reproduction Link
http://jsfiddle.net/oenkitt/zzvbndza/
Steps to reproduce
Here is the basic structure of my navigation menu:
<ul>
<li v-link-active>
<a v-link>Top level menu item</a>
<ul>
<li><a v-link>Sub menu item 1</a></li>
<li><a v-link>Sub menu item 2</a></li> <!-- This one works -->
</ul>
</li>
</ul>
What is Expected?
The "v-link-active" class should be applied to the parent element when any of the child "v-links" match the current route.
What is actually happening?
The "v-link-active" class is only applied to the parent element when the last child element matches the current route.
In my example on jsFiddle, the "v-link-active" class should be applied to the "Leads" menu item if any of the contained sub-menu items ("Overview" or "Profiles") match the current route. Currently, this only works when the last sub-menu item ("Profiles") is active, but does not work when "Leads" or "Overview" are active.
franciscolourenco