Skip to content

Commit 5ca154b

Browse files
crisbetojelbourn
authored andcommitted
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.
1 parent 1b2f90c commit 5ca154b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/menu/menu-directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export class MatMenu implements AfterContentInit, MatMenuPanel, OnDestroy {
129129
@ViewChild(TemplateRef) templateRef: TemplateRef<any>;
130130

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

134134
/**
135135
* Menu content that will be rendered lazily.

0 commit comments

Comments
 (0)