problems panel: enable acknowledges

This commit is contained in:
Alexander Zobnin
2018-12-24 16:55:20 +03:00
parent d3488becdd
commit 2fefa11aea
4 changed files with 22 additions and 2 deletions

View File

@@ -4,7 +4,7 @@ import ReactDOM from 'react-dom';
interface ModalProps {
isOpen?: boolean;
withBackdrop?: boolean;
onSubmit: (data?: AckProblemData) => void;
onSubmit: (data?: AckProblemData) => Promise<any> | any;
onClose?: () => void;
}
@@ -42,6 +42,8 @@ export class Modal extends PureComponent<ModalProps, ModalState> {
console.log('submit', this.state.value);
this.props.onSubmit({
message: this.state.value
}).then(() => {
this.dismiss();
});
}