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(tab-bar): allow individually disabled tabs with enabled tab-bar #717

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

MikeMatusz
Copy link
Contributor

Fixes #707

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added/updated: Y
  • Docs have been added/updated: Y
  • Does this PR introduce a breaking change? N
  • I have linked any related GitHub issues to be closed when this PR is merged? Y

Describe the new behavior?

Initially and when new tabs are added to the DOM, only override their disabled state if the tab-bar is disabled, otherwise respect the disabled state of the tabs itself.

Setting the disabled property of the tab-bar will still override the disabled state of all child tabs. Documentation has been updated to indicate that mixing the two methods of disabling tabs is not supported. In scenarios where tabs are always enabled/disabled as a group, the developer has the option of setting tab-bar disabled as a convenience. If there are scenarios where individual tabs can be disabled under separate conditions, then the developer should update the tab disabled properties exclusively.

Additional information

Had to update the test harness to update the disabled attribute rather than property. Lit's property binding always sets the property, and was explicitly setting the tab-bar disabled property to false, which is not the same as omitting the attribute.

@MikeMatusz MikeMatusz requested a review from a team as a code owner October 22, 2024 13:25
Copy link

stackblitz bot commented Oct 22, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions github-actions bot added the patch Increment the patch version when merged label Oct 22, 2024
@DRiFTy17 DRiFTy17 added skip-release Preserve the current version when merged and removed skip-release Preserve the current version when merged labels Oct 22, 2024
@DRiFTy17 DRiFTy17 merged commit cf3edba into main Oct 22, 2024
11 checks passed
@DRiFTy17 DRiFTy17 deleted the fix-tab-bar-disabled branch October 22, 2024 18:01
Copy link
Contributor

🚀 PR was released in v3.3.0 🚀

@github-actions github-actions bot added the released This issue/pull request has been released. label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[tab-bar] individual tab disabled state overwritten by tab bar
2 participants