mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2026-01-20 10:52:43 +01:00
Add autofocus for name input
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user