Skip to content

Commit

Permalink
fix(admin-ui): Make dropdowns scrollable
Browse files Browse the repository at this point in the history
Fixes #824
  • Loading branch information
michaelbromley committed Apr 20, 2021
1 parent 41b6e5b commit e887a2b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
background-color: hotpink;
}

.dropdown-content-wrapper {
}

.dropdown.open > .dropdown-menu {
position: relative;
top: 0;
height: 100%;
overflow-y: auto;
}

:host {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ export type DropdownPosition = 'top-left' | 'top-right' | 'bottom-left' | 'botto
<ng-template #menu>
<div class="dropdown open">
<div class="dropdown-menu">
<ng-content></ng-content>
<div class="dropdown-content-wrapper">
<ng-content></ng-content>
</div>
</div>
</div>
</ng-template>
Expand Down Expand Up @@ -78,6 +80,7 @@ export class DropdownMenuComponent implements AfterViewInit, OnInit, OnDestroy {
hasBackdrop: true,
backdropClass: 'clear-backdrop',
positionStrategy: this.getPositionStrategy(),
maxHeight: '70vh',
});
this.menuPortal = new TemplatePortal(this.menuTemplate, this.viewContainerRef);
this.backdropClickSub = this.overlayRef.backdropClick().subscribe(() => {
Expand Down

0 comments on commit e887a2b

Please sign in to comment.