Add autofocus for name input

This commit is contained in:
boryslevytskyi
2017-05-13 22:35:13 +03:00
parent 69b59fe51e
commit c550d46f86

View File

@@ -8,8 +8,13 @@ export default class InputBox extends React.Component {
this.historyIndex = 0;
}
componentDidMount(){
this.nameInput.focus();
}
render() {
return <input id="in" type="text"
ref={(input) => { this.nameInput = input; }}
onKeyUp={e => this.onKeyUp(e)}
onKeyDown={e => this.onKeyDown(e)}
className="expressionInput mono"