-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
isActive
is not set when routes use wildcards
#2115
Comments
After taking a look at the code, it seems like this is intended: const isActive = computed<boolean>(
() =>
activeRecordIndex.value > -1 &&
includesParams(currentRoute.params, route.value.params)
) I thought it worked something like this: const isActive = computed<boolean>(
() =>
activeRecordIndex.value > -1 &&
activeRecordIndex.value === currentRoute.matched.length - 1
) Is that's so, I suggest adding something like If you don't think it's useful, that's okay, thanks a lot for your hard work ❤️! |
Hello! |
Reproduction
https://jsfiddle.net/5mg7jhz3/
Steps to reproduce the bug
Click on
Bar
(/foo/bar
link) which is under the/foo/:other(.*)*
route.There are only two routes:
Expected behavior
Foo (
/foo
link) should haveActual behavior
Foo (
/foo
link) haveAdditional information
I thought it was #1552, but it's actually different, since it's the same route in the router.
According to https://router.vuejs.org/guide/migration/index.html#Removal-of-the-exact-prop-in-router-link-
Routes are now active based on the route records they represent
So I think it should be active 🤔
I can do a PR if that's okay.
The text was updated successfully, but these errors were encountered: