We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0a7ab9 commit 8b84622Copy full SHA for 8b84622
src/components/ElementDetails/CustomValueInput.js
@@ -1,4 +1,5 @@
1
import React, { PropTypes, Component } from 'react'
2
+import ReactDOM from 'react-dom'
3
4
import {
5
PrimitivePropTypes
@@ -14,6 +15,12 @@ export default class CustomValueInput extends Component {
14
15
this.customInput = this.customInput.bind(this)
16
}
17
18
+ componentDidMount() {
19
+ if(this.refs.valueInput) {
20
+ ReactDOM.findDOMNode(this.refs.valueInput).focus()
21
+ }
22
23
+
24
customInput() {
25
const {
26
handleChange,
@@ -54,6 +61,7 @@ export default class CustomValueInput extends Component {
54
61
return (
55
62
<input
56
63
onChange={ (e) => handleChange(id, e, workspaceIndex) }
64
+ ref="valueInput"
57
65
type={ inputType }
58
66
value={ value }
59
67
/>
0 commit comments