Skip to content

Commit

Permalink
fix(module:auto-complete, mention, tree-select): update cdk overlay p…
Browse files Browse the repository at this point in the history
…ositioning strategy (#1761)

close #1756
  • Loading branch information
hsuanxyz authored and vthinkxie committed Jul 1, 2018
1 parent 689f8b4 commit 82af2ff
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,11 @@ export class NzAutocompleteTriggerDirective implements ControlValueAccessor, OnD
new ConnectionPositionPair({ originX: 'start', originY: 'bottom' }, { overlayX: 'start', overlayY: 'top' }),
new ConnectionPositionPair({ originX: 'start', originY: 'top' }, { overlayX: 'start', overlayY: 'bottom' })
];
this.positionStrategy = this._overlay.position().flexibleConnectedTo(this.getConnectedElement()).withPositions(positions);
this.positionStrategy = this._overlay.position()
.flexibleConnectedTo(this.getConnectedElement())
.withPositions(positions)
.withFlexibleDimensions(false)
.withPush(false);
return this.positionStrategy;
}

Expand Down
6 changes: 5 additions & 1 deletion components/mention/mention.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,11 @@ export class NzMentionComponent implements OnDestroy, AfterContentInit {
new ConnectionPositionPair({ originX: 'start', originY: 'bottom' }, { overlayX: 'start', overlayY: 'top' }),
new ConnectionPositionPair({ originX: 'start', originY: 'top' }, { overlayX: 'start', overlayY: 'bottom' })
];
this.positionStrategy = this.overlay.position().flexibleConnectedTo(this.trigger.el).withPositions(positions).withLockedPosition(true);
this.positionStrategy = this.overlay.position()
.flexibleConnectedTo(this.trigger.el)
.withPositions(positions)
.withFlexibleDimensions(false)
.withPush(false);
return this.positionStrategy;
}

Expand Down
6 changes: 5 additions & 1 deletion components/tree-select/nz-tree-select.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,11 @@ export class NzTreeSelectComponent implements ControlValueAccessor, OnInit, Afte
new ConnectionPositionPair({ originX: 'start', originY: 'bottom' }, { overlayX: 'start', overlayY: 'top' }),
new ConnectionPositionPair({ originX: 'start', originY: 'top' }, { overlayX: 'start', overlayY: 'bottom' })
];
this.positionStrategy = this.overlay.position().flexibleConnectedTo(this.treeSelect).withPositions(positions).withLockedPosition(true);
this.positionStrategy = this.overlay.position()
.flexibleConnectedTo(this.treeSelect)
.withPositions(positions)
.withFlexibleDimensions(false)
.withPush(false);
return this.positionStrategy;
}

Expand Down

0 comments on commit 82af2ff

Please sign in to comment.