Skip to content
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

RouterLink isActive slot not true when it should be #1552

Open
codecat opened this issue Sep 14, 2022 · 2 comments
Open

RouterLink isActive slot not true when it should be #1552

codecat opened this issue Sep 14, 2022 · 2 comments
Labels
contribution welcome The team would welcome a contribution from the community for this issue docs Concerns the documentation content or the documentation website

Comments

@codecat
Copy link

codecat commented Sep 14, 2022

Version

4.1.5

Reproduction link

jsfiddle.net/16nudxt0/

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.

@posva
Copy link
Member

posva commented Sep 14, 2022

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

@posva posva added contribution welcome The team would welcome a contribution from the community for this issue docs Concerns the documentation content or the documentation website labels Sep 14, 2022
@codecat
Copy link
Author

codecat commented Sep 14, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution welcome The team would welcome a contribution from the community for this issue docs Concerns the documentation content or the documentation website
Projects
None yet
Development

No branches or pull requests

2 participants