@@ -29,7 +29,7 @@ import {
2929 ViewContainerRef ,
3030} from '@angular/core' ;
3131import { TemplatePortal } from '@angular/cdk/portal' ;
32- import { Overlay , OverlayConfig , OverlayRef , PositionStrategy } from '@angular/cdk/overlay' ;
32+ import { ConnectedPosition , Overlay , OverlayConfig , OverlayRef , PositionStrategy } from '@angular/cdk/overlay' ;
3333import { Subscription } from 'rxjs' ;
3434import { WindowRegistry } from '../window/window-state' ;
3535import { focusWatcher } from '../../core/utils' ;
@@ -98,6 +98,8 @@ export class DropdownComponent implements OnChanges, OnDestroy, AfterViewInit {
9898 @Input ( ) overlay : boolean | '' = false ;
9999
100100 @Input ( ) show ?: boolean ;
101+ @Input ( ) connectedPositions : ConnectedPosition [ ] = [ ] ;
102+
101103 @Output ( ) showChange = new EventEmitter < boolean > ( ) ;
102104
103105 @Output ( ) shown = new EventEmitter ( ) ;
@@ -205,6 +207,7 @@ export class DropdownComponent implements OnChanges, OnDestroy, AfterViewInit {
205207 . withPush ( true )
206208 . withDefaultOffsetY ( this . overlay !== false ? 15 : 0 )
207209 . withPositions ( [
210+ ...this . connectedPositions ,
208211 {
209212 originX : 'start' ,
210213 originY : 'bottom' ,
@@ -232,6 +235,7 @@ export class DropdownComponent implements OnChanges, OnDestroy, AfterViewInit {
232235 . withPush ( true )
233236 . withDefaultOffsetY ( this . overlay !== false ? 15 : 0 )
234237 . withPositions ( [
238+ ...this . connectedPositions ,
235239 {
236240 originX : this . center ? 'center' : 'start' ,
237241 originY : 'bottom' ,
0 commit comments