Skip to content

Commit

Permalink
feat(module:tooltip,popover,popconfirm): make cdkConnectedOverlayPush…
Browse files Browse the repository at this point in the history
… open for tooltip (#8166)

Co-authored-by: YuhengZhou <[email protected]>
  • Loading branch information
yuhengzhouz and YuhengZhou authored Nov 18, 2023
1 parent 5aa4db9 commit a821c62
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/popconfirm/popconfirm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export class NzPopconfirmDirective extends NzTooltipBaseDirective {
(positionChange)="onPositionChange($event)"
[cdkConnectedOverlayPositions]="_positions"
[cdkConnectedOverlayOpen]="_visible"
[cdkConnectedOverlayPush]="true"
[cdkConnectedOverlayPush]="cdkConnectedOverlayPush"
[nzArrowPointAtCenter]="nzArrowPointAtCenter"
>
<div
Expand Down
2 changes: 1 addition & 1 deletion components/popover/popover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export class NzPopoverDirective extends NzTooltipBaseDirective {
[cdkConnectedOverlayOrigin]="origin"
[cdkConnectedOverlayPositions]="_positions"
[cdkConnectedOverlayOpen]="_visible"
[cdkConnectedOverlayPush]="true"
[cdkConnectedOverlayPush]="cdkConnectedOverlayPush"
[nzArrowPointAtCenter]="nzArrowPointAtCenter"
(overlayOutsideClick)="onClickOutside($event)"
(detach)="hide()"
Expand Down
3 changes: 3 additions & 0 deletions components/tooltip/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export abstract class NzTooltipBaseDirective implements OnChanges, OnDestroy, Af
mouseLeaveDelay?: number;
overlayClassName?: string;
overlayStyle?: NgStyleInterface;
cdkConnectedOverlayPush?: boolean;
visibleChange = new EventEmitter<boolean>();

/**
Expand Down Expand Up @@ -272,6 +273,7 @@ export abstract class NzTooltipBaseDirective implements OnChanges, OnDestroy, Af
overlayClassName: ['nzOverlayClassName', () => this._overlayClassName],
overlayStyle: ['nzOverlayStyle', () => this._overlayStyle],
arrowPointAtCenter: ['nzArrowPointAtCenter', () => this.arrowPointAtCenter],
cdkConnectedOverlayPush: ['cdkConnectedOverlayPush', () => this.cdkConnectedOverlayPush],
...this.getProxyPropertyMap()
};

Expand Down Expand Up @@ -342,6 +344,7 @@ export abstract class NzTooltipBaseComponent implements OnDestroy, OnInit {
nzBackdrop = false;
nzMouseEnterDelay?: number;
nzMouseLeaveDelay?: number;
cdkConnectedOverlayPush?: boolean = true;

nzVisibleChange = new Subject<boolean>();

Expand Down
3 changes: 2 additions & 1 deletion components/tooltip/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export class NzTooltipDirective extends NzTooltipBaseDirective {
@Input('nzTooltipOverlayClassName') override overlayClassName?: string;
@Input('nzTooltipOverlayStyle') override overlayStyle?: NgStyleInterface;
@Input('nzTooltipArrowPointAtCenter') @InputBoolean() override arrowPointAtCenter?: boolean;
@Input() @InputBoolean() override cdkConnectedOverlayPush?: boolean = true;
@Input() nzTooltipColor?: string;

// eslint-disable-next-line @angular-eslint/no-output-rename
Expand Down Expand Up @@ -98,7 +99,7 @@ export class NzTooltipDirective extends NzTooltipBaseDirective {
[cdkConnectedOverlayOrigin]="origin"
[cdkConnectedOverlayOpen]="_visible"
[cdkConnectedOverlayPositions]="_positions"
[cdkConnectedOverlayPush]="true"
[cdkConnectedOverlayPush]="cdkConnectedOverlayPush"
[nzArrowPointAtCenter]="nzArrowPointAtCenter"
(overlayOutsideClick)="onClickOutside($event)"
(detach)="hide()"
Expand Down

0 comments on commit a821c62

Please sign in to comment.