Skip to content

[next] active router-link with query #635

Closed
@inca

Description

@inca

When :to="{ name: 'xyz', query: {} }" form is used, active class is not set correctly. Debugging revealed that :exact="true" links also compare hash with strict equality, so I was able to get this stuff working by including hash: "", which is obviously not what one would ever expect ;)

Example: https://jsfiddle.net/borisokunskiy/yjm90k1j/1/

To repro just click through various links and observe classes set correctly only on "Exact links with hash="":" group.

That being said, I believe that non-exact links being active regardless of query value is not expected either, but I wonder if that's by design.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions