Skip to content

Commit 65756d7

Browse files
committed
fix: offset changes not being deteched in md-select
1 parent 84da1c9 commit 65756d7

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/lib/core/overlay/overlay-directives.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,15 @@ export class ConnectedOverlayDirective implements OnDestroy, OnChanges {
146146

147147
ngOnChanges(changes: SimpleChanges) {
148148
if (changes['open']) {
149-
changes['open'].currentValue ? this._attachOverlay() : this._detachOverlay();
149+
this.open ? this._attachOverlay() : this._detachOverlay();
150150
}
151151

152152
if (changes['offsetX'] && this._position) {
153-
this._position.withOffsetX(changes['offsetX'].currentValue);
153+
this._position.withOffsetX(this.offsetX);
154154
}
155155

156156
if (changes['offsetY'] && this._position) {
157-
this._position.withOffsetY(changes['offsetY'].currentValue);
157+
this._position.withOffsetY(this.offsetY);
158158
}
159159
}
160160

src/lib/select/select.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,7 @@ export class MdSelect implements AfterContentInit, ControlValueAccessor, OnDestr
577577
}
578578

579579
this._checkOverlayWithinViewport(maxScroll);
580+
this._changeDetectorRef.detectChanges();
580581
}
581582

582583
/**

0 commit comments

Comments
 (0)