mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 21:19:37 +08:00
+ call onCancel when pressing esc key (#5209)
* + call onCancel when pressing esc key * + call onCancel when press esc corrections
This commit is contained in:
parent
c91704854b
commit
f3cc8dfe0d
@ -30,11 +30,12 @@ export default function confirm(config) {
|
||||
(props.okCancel ? runtimeLocale.okText : runtimeLocale.justOkText);
|
||||
props.cancelText = props.cancelText || runtimeLocale.cancelText;
|
||||
|
||||
function close() {
|
||||
function close(...args) {
|
||||
const unmountResult = ReactDOM.unmountComponentAtNode(div);
|
||||
if (unmountResult && div.parentNode) {
|
||||
div.parentNode.removeChild(div);
|
||||
}
|
||||
props.onCancel(...args);
|
||||
}
|
||||
|
||||
let body = (
|
||||
|
Loading…
Reference in New Issue
Block a user