Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tooltip is not hidden when setting value to null #4352

Closed
sasensi opened this issue Oct 27, 2019 · 2 comments
Closed

tooltip is not hidden when setting value to null #4352

sasensi opened this issue Oct 27, 2019 · 2 comments

Comments

@sasensi
Copy link

sasensi commented Oct 27, 2019

Reproduction link

https://stackblitz.com/edit/ng-zorro-antd-issue-tooltip

Steps to reproduce

1 - hover tooltip area and see that tooltip is displayed
2 - click on "toggle tooltip visibility" button
3 - hover tooltip area and see that tooltip is still displayed

What is expected?

tooltip should no longer be displayed after switching the nz-tooltip value to null

What is actually happening?

tooltip is still displayed after switching the nz-tooltip value to null

Environment Info
ng-zorro-antd 8.4.1
Browser chrome

My reproduction link also provides a workaround relying on nzOverlayStyle to force the tooltip to be hidden.
But I think that this is not an ideal solution.

@wzhudev
Copy link
Member

wzhudev commented Nov 6, 2019

<div class="case">
    <h1>Issue</h1>
    <div
            class="tooltip-area"
            nz-tooltip
            [nzTitle]="tooltipVisible ? 'here is the tooltip' : ''"
    >
        tooltip should be {{tooltipVisible ? 'visible' : 'hidden'}}
    </div>
    <button nz-button (click)="tooltipVisible=!tooltipVisible">
        toggle tooltip visibility
    </button>
</div>

You can use it as a workaround now.

@vthinkxie
Copy link
Member

close via #4392

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants