fix: Modal.method should stop loading when promise throw err, close: #6183

This commit is contained in:
Benjy Cui 2017-06-06 11:51:50 +08:00
parent 920b32e94c
commit 8c632ef2cf

View File

@ -43,6 +43,9 @@ export default class ActionButton extends React.Component<ActionButtonProps, any
// It's unnecessary to set loading=false, for the Modal will be unmounted after close.
// this.setState({ loading: false });
closeModal(...args);
}, () => {
// See: https://github.com/ant-design/ant-design/issues/6183
this.setState({ loading: false });
});
}
} else {