-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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(menu): nested menu error when items are rendered in a repeater #6766
fix(menu): nested menu error when items are rendered in a repeater #6766
Conversation
1722b5a
to
bc679f8
Compare
src/lib/menu/menu-directive.ts
Outdated
@@ -76,8 +78,11 @@ export class MdMenu implements AfterContentInit, MdMenuPanel, OnDestroy { | |||
/** Subscription to tab events on the menu panel */ | |||
private _tabSubscription: Subscription; | |||
|
|||
/** Stream that emits whenever the component is intialized. */ | |||
private _initialized = new Subject<void>(); |
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.
Instead of creating another Subject to track initialization, how about using NgZone.onStable
?
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’m not sure whether the timing is the same.
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 stand corrected, it does work.
bc679f8
to
96409ac
Compare
Addressed the feedback @kara, PTAL. |
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
@crisbeto Thanks for making this fix. Could you please let me know of when we can expect this changes merged? Looking forward to using this nested menus. Thanks, |
Fixes an error that was being thrown when the menu items that trigger a sub-menu are rendered in a repeater. Fixes angular#6765.
38de0a7
to
9f8734a
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. |
Fixes an error that was being thrown when the menu items that trigger a sub-menu are rendered in a repeater.
Fixes #6765.