Commit efd441d0 authored by mgabdev's avatar mgabdev

Added onCancel function prop to confirmation_modal

Added an optional function to call on confirmation modal
parent 8aeeaa72
......@@ -14,6 +14,7 @@ class ConfirmationModal extends React.PureComponent {
secondary: PropTypes.string,
onSecondary: PropTypes.func,
intl: PropTypes.object.isRequired,
onCancel: PropTypes.func,
};
componentDidMount() {
......@@ -31,7 +32,9 @@ class ConfirmationModal extends React.PureComponent {
}
handleCancel = () => {
this.props.onClose();
const {onClose, onCancel} = this.props;
onClose();
if (onCancel) onCancel();
}
setRef = (c) => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment