1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-09 00:00:01 +01:00

Add autofocus to editable header

This commit is contained in:
Markus Grigull 2018-05-30 13:04:23 +02:00
parent c5a9ccdf75
commit ca20df0b3b

View file

@ -24,6 +24,8 @@ import PropTypes from 'prop-types';
import { Glyphicon, FormControl } from 'react-bootstrap';
class EditableHeader extends React.Component {
titleInput = null;
constructor(props) {
super(props);
@ -79,7 +81,7 @@ class EditableHeader extends React.Component {
return <div>
<form style={wrapperStyle}>
<FormControl type='text' bsSize='large' value={this.state.title} onChange={this.onChange} style={editStyle} />
<FormControl type='text' bsSize='large' value={this.state.title} onChange={this.onChange} style={editStyle} autoFocus />
</form>
<a onClick={this.save}><Glyphicon glyph='ok' style={glyphStyle} /></a>