Skip to content

Commit 74424ac

Browse files
crisbetowagnermaciel
authored andcommitted
fix(material/menu): allow menu height to grow after open (angular#21436)
Currently the menu only shrinks if the users scrolls after it has been opened, but if they scroll back to a place where there's enough place to fit the content, the menu will stay collapsed. These changes adjust the config so the menu can grow after it was opened. Fixes angular#18168. Fixes angular#13988.
1 parent 8d19dde commit 74424ac

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/material/menu/menu-trigger.ts

+1
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@ export class MatMenuTrigger implements AfterContentInit, OnDestroy {
416416
positionStrategy: this._overlay.position()
417417
.flexibleConnectedTo(this._element)
418418
.withLockedPosition()
419+
.withGrowAfterOpen()
419420
.withTransformOriginOn('.mat-menu-panel, .mat-mdc-menu-panel'),
420421
backdropClass: this.menu.backdropClass || 'cdk-overlay-transparent-backdrop',
421422
panelClass: this.menu.overlayPanelClass,

0 commit comments

Comments
 (0)