fix(tab-bar): allow individually disabled tabs with enabled tab-bar #717
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #707
PR Checklist
Please check if your PR fulfills the following requirements:
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.