Skip to content

Commit 83f2adc

Browse files
authored
fix(material/menu): allow menu height to grow after open (#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 #18168. Fixes #13988.
1 parent 1fb03ce commit 83f2adc

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)