Highlight input when user focuses
parent
2c3ab050d7
commit
7b761d6ccb
|
@ -36,6 +36,10 @@ class DashboardEditHeader extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleFocus = e => {
|
||||||
|
e.target.select()
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {onEditDashboard, isEditMode, dashboardName} = this.props
|
const {onEditDashboard, isEditMode, dashboardName} = this.props
|
||||||
|
|
||||||
|
@ -52,6 +56,7 @@ class DashboardEditHeader extends Component {
|
||||||
spellCheck={false}
|
spellCheck={false}
|
||||||
onBlur={this.handleInputBlur}
|
onBlur={this.handleInputBlur}
|
||||||
onKeyDown={this.handleKeyDown}
|
onKeyDown={this.handleKeyDown}
|
||||||
|
onFocus={this.handleFocus}
|
||||||
placeholder="Name this Dashboard"
|
placeholder="Name this Dashboard"
|
||||||
ref={r => (this.inputRef = r)}
|
ref={r => (this.inputRef = r)}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue