diff --git a/build/config.js b/build/config.js index 7498a5ca0..6ad118ad5 100644 --- a/build/config.js +++ b/build/config.js @@ -1,5 +1,5 @@ module.exports = { dev: { - componentName: 'message', // dev components + componentName: 'modal', // dev components }, }; diff --git a/components/modal/ActionButton.jsx b/components/modal/ActionButton.jsx index 264214aa8..882a4a0fa 100644 --- a/components/modal/ActionButton.jsx +++ b/components/modal/ActionButton.jsx @@ -48,7 +48,10 @@ export default { // this.setState({ loading: false }); closeModal(...args); }, - () => { + e => { + // Emit error when catch promise reject + // eslint-disable-next-line no-console + console.error(e); // See: https://github.com/ant-design/ant-design/issues/6183 this.setState({ loading: false }); }, diff --git a/components/modal/ConfirmDialog.jsx b/components/modal/ConfirmDialog.jsx index 154a0b3b1..4fd38e848 100644 --- a/components/modal/ConfirmDialog.jsx +++ b/components/modal/ConfirmDialog.jsx @@ -27,6 +27,7 @@ export default { } = props; warning( !('iconType' in props), + 'Modal', `The property 'iconType' is deprecated. Use the property 'icon' instead.`, ); const icon = props.icon ? props.icon : iconType; @@ -92,9 +93,9 @@ export default {