Skip to content

Commit

Permalink
fix(menu): not picking up indirect descendant items (#9971)
Browse files Browse the repository at this point in the history
Fixes the menu directive not picking up menu items that aren't direct descendants of the panel.

Fixes #9969.
  • Loading branch information
crisbeto authored and andrewseguin committed Feb 20, 2018
1 parent 3212111 commit 14b21e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/menu/menu-directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export class MatMenu implements AfterContentInit, MatMenuPanel, OnDestroy {
@ViewChild(TemplateRef) templateRef: TemplateRef<any>;

/** List of the items inside of a menu. */
@ContentChildren(MatMenuItem) items: QueryList<MatMenuItem>;
@ContentChildren(MatMenuItem, {descendants: true}) items: QueryList<MatMenuItem>;

/**
* Menu content that will be rendered lazily.
Expand Down

0 comments on commit 14b21e9

Please sign in to comment.