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

fix(v2): fix docs sidebar highlighting if link is partially matched #2061

Merged
merged 1 commit into from Nov 27, 2019

Conversation

endiliey
Copy link
Contributor

Motivation

Close #2059

For sidebar, we should pass exact to Link component so that it will only match if its exact

https://github.com/ReactTraining/react-router/blob/master/packages/react-router-dom/docs/api/NavLink.md#exact-bool

So if current page is /blog/test, it won't match /blog

Have you read the Contributing Guidelines on pull requests?

yes

Test Plan

Before
before

After
after

@endiliey endiliey added the pr: bug fix This PR fixes a bug in a past release. label Nov 27, 2019
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Nov 27, 2019
@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-2 ready!

Built with commit 64d34c2

https://deploy-preview-2061--docusaurus-2.netlify.com

@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-preview ready!

Built with commit 64d34c2

https://deploy-preview-2061--docusaurus-preview.netlify.com

Copy link
Contributor

@yangshun yangshun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was quick 😄

@yangshun yangshun merged commit 6ff6656 into master Nov 27, 2019
@yangshun yangshun deleted the endi/exact branch November 27, 2019 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple menu items active when using subdirectories in docs
5 participants