Here is sandbox Antd pop over
As you can see in the example when you click out side anywhere, popover automatically closed. I want to disable that thing and close it only through click on a button. I don't see such options in Popover and Tooltip apis. Is this possible?
For this you need to remove your onVisibleChange={this.handleVisibleChange}
method. You can call this.handleVisibleChange
function on button click as given below:
<Popover
content={<a onClick={this.hide}>Close</a>}
title="Title"
trigger="click"
visible={this.state.visible}
>
<Button onClick={this.handleVisibleChange} type="primary">Click me</Button>
</Popover>
I have created a working example on codesandbox.io.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With