router
router copied to clipboard
RouterLink isActive slot not true when it should be
Version
4.1.5
Reproduction link
Steps to reproduce
In the jsfiddle, click on "bar".
What is expected?
I would expect the bool values after "foo" to show "true, false", because /foo/bar should indicate that /foo is active (but not exact).
What is actually happening?
The "foo" link says isActive is false.
This is intended. See https://router.vuejs.org/guide/migration/index.html#removal-of-the-exact-prop-in-router-link
I think this could be added somewhere else on docs. Maybe when we talk about active class or maybe in extending router link section
Ah, I missed that in the migration guide. If I read the RFC correctly, to get this behavior like it was in Vue Router 3, I would have to check manually if the current URL starts with the path of the router link?