Dispatch 'Monitor' flag render function (#3072)

Adds update of monitor availability when it appears/disappears.
The constructor is only called once at the beginning.
This commit is contained in:
Roberto Bruggemann
2018-02-26 22:50:58 +00:00
committed by Roland Schilter
parent c9d9068f68
commit d6c2e96e34

View File

@@ -99,6 +99,12 @@ class App extends React.Component {
this.router.stop();
}
componentWillReceiveProps(nextProps) {
if (nextProps.monitor !== this.props.monitor) {
this.props.dispatch(setMonitorState(nextProps.monitor));
}
}
onKeyUp(ev) {
const { showingTerminal } = this.props;
keyPressLog('onKeyUp', 'keyCode', ev.keyCode, ev);