fix(menu): not picking up indirect descendant items (#9971)

Fixes the menu directive not picking up menu items that aren't direct descendants of the panel.

Fixes #9969.
This commit is contained in:
Kristiyan Kostadinov
2018-02-18 01:49:44 +01:00
committed by Jeremy Elbourn
parent 1b2f90ce82
commit 5ca154b19b
+1 -1
View File
@@ -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.