-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(tabs): not picking up indirect descendant tabs in ivy #17346
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
Conversation
@@ -243,11 +248,26 @@ export abstract class _MatTabGroupBase extends _MatTabGroupMixinBase implements | |||
} | |||
} | |||
|
|||
this._subscribeToTabLabels(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this call because I noticed that there's another one just like it a few lines above. It seems like an issue when resolving merge conflicts.
e90b623
to
1e2a8fc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
</mat-tab-group> | ||
`, | ||
}) | ||
class TabGroupWithIndirectDescendantTabs { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is all duplicated from what's in material/
. Do we have a reason for choosing this approach?
Was it too much work or is there a blocker to trying to export something from material/
tests that could be re-used in the material-experimental/mdc-x
tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
In ViewEngine `ContentChildren` would pick up indirect descendant items, as long as another directive wasn't matched along the way. This allowed for tabs to be wrapped inside something like an `ng-container`. With Ivy `ContentChildren` is a little more strict and it only works on direct descendants. These changes turn on `descendants` so that we continue supporting the existing use cases from ViewEngine. Note that it needs a bit of extra logic in order to ensure that nested tab groups continue to work as expected. Fixes angular#17336.
1e2a8fc
to
ef1c63f
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
In ViewEngine
ContentChildren
would pick up indirect descendant items, as long as another directive wasn't matched along the way. This allowed for tabs to be wrapped inside something like anng-container
. With IvyContentChildren
is a little more strict and it only works on direct descendants.These changes turn on
descendants
so that we continue supporting the existing use cases from ViewEngine. Note that it needs a bit of extra logic in order to ensure that nested tab groups continue to work as expected.Fixes #17336.