So by default, Antd Modal will trigger the onCancel property of Modal when the user clicks on the mask(area outside the modal).
But what i want is the program to not trigger anything when the user click mask (just close the modal and not change anything), because i have my own function in the onCancel. How do i make it so? Thanks in advance!
Its so easy, you can delete onCancel line on your modal :D
<Modal
title="Basic Modal"
visible={this.state.visible}
onOk={this.handleOk}
//onCancel={this.handleCancel}
>
<p>Some contents...</p>
<p>Some contents...</p>
<p>Some contents...</p>
</Modal>
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