From 024c62d58bca95c34ed4112e2810f6929c26360f Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Fri, 25 Dec 2020 11:36:40 +0200 Subject: [PATCH] fix(material/menu): allow menu height to grow after open 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. --- src/material/menu/menu-trigger.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/material/menu/menu-trigger.ts b/src/material/menu/menu-trigger.ts index 06de01f4fb1d..344de67922f1 100644 --- a/src/material/menu/menu-trigger.ts +++ b/src/material/menu/menu-trigger.ts @@ -416,6 +416,7 @@ export class MatMenuTrigger implements AfterContentInit, OnDestroy { positionStrategy: this._overlay.position() .flexibleConnectedTo(this._element) .withLockedPosition() + .withGrowAfterOpen() .withTransformOriginOn('.mat-menu-panel, .mat-mdc-menu-panel'), backdropClass: this.menu.backdropClass || 'cdk-overlay-transparent-backdrop', panelClass: this.menu.overlayPanelClass,