mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
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:
committed by
Jeremy Elbourn
parent
1b2f90ce82
commit
5ca154b19b
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user