Highlight input when user focuses

pull/10616/head
Alex P 2017-10-10 15:27:47 -07:00 committed by Andrew Watkins
parent 4395ef6e14
commit fdf285aca9
1 changed files with 5 additions and 0 deletions

View File

@ -36,6 +36,10 @@ class DashboardEditHeader extends Component {
}
}
handleFocus = e => {
e.target.select()
}
render() {
const {onEditDashboard, isEditMode, dashboardName} = this.props
@ -52,6 +56,7 @@ class DashboardEditHeader extends Component {
spellCheck={false}
onBlur={this.handleInputBlur}
onKeyDown={this.handleKeyDown}
onFocus={this.handleFocus}
placeholder="Name this Dashboard"
ref={r => (this.inputRef = r)}
/>