feature (org): cool stuff for org mode users ;)

This commit is contained in:
Mickael KERJEAN
2018-04-24 22:58:28 +10:00
parent e31cbc13e9
commit 259061f5d8
34 changed files with 2570 additions and 289 deletions

View File

@ -13,7 +13,6 @@ export class ModalPrompt extends React.Component {
};
this.onCancel = this.onCancel.bind(this);
this.onSubmit = this.onSubmit.bind(this);
this.onEscapeKeyPress = this.onEscapeKeyPress.bind(this);
}
componentDidMount(){
@ -27,16 +26,12 @@ export class ModalPrompt extends React.Component {
fns: {ok: okCallback, cancel: cancelCallback}
});
});
window.addEventListener('keydown', this.onEscapeKeyPress);
}
componentDidUmount(){
window.removeEventListener('keydown', this.onEscapeKeyPress);
}
onCancel(){
this.setState({appear: false});
this.state.fns.cancel();
this.state.fns && this.state.fns.cancel();
}
onSubmit(e){