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): Do not automatically change tab when a non-existing option is selected #2893

Merged
merged 1 commit into from
Jun 6, 2020
Merged

fix(v2): Do not automatically change tab when a non-existing option is selected #2893

merged 1 commit into from
Jun 6, 2020

Conversation

SamChou19815
Copy link
Contributor

Motivation

Address #2885.

When a tab group choice is updated, the updated choice might not be available in some tab groups. In the current implementation, it will just appear that nothing is chosen, which might look confusing. This diff changes the behavior so that it will avoid updating a local tab choice when a tab group choice chooses an non-existing option.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

See the added docs. When I select Linux which doesn't exist in the above two tab groups, those groups' tab choices don't change.

Screen Shot 2020-06-05 at 20 12 38

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-2 ready!

Built with commit 9cd42c5

https://deploy-preview-2893--docusaurus-2.netlify.app

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's a great idea and nicely solves the problem without introducing more complexity. Nice job! :)

Tested out and it works great!

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.

5 participants