|
@@ -6,6 +6,11 @@ import { getFieldValue } from '../../../react';
|
6
|
6
|
|
7
|
7
|
type Props = {
|
8
|
8
|
|
|
9
|
+ /**
|
|
10
|
+ * If the input should be focused on display.
|
|
11
|
+ */
|
|
12
|
+ autoFocus?: boolean,
|
|
13
|
+
|
9
|
14
|
/**
|
10
|
15
|
* Class name to be appended to the default class list.
|
11
|
16
|
*/
|
|
@@ -109,6 +114,7 @@ export default class InputField extends PureComponent<Props, State> {
|
109
|
114
|
render() {
|
110
|
115
|
return (
|
111
|
116
|
<input
|
|
117
|
+ autoFocus = { this.props.autoFocus }
|
112
|
118
|
className = { `field ${this.state.focused ? 'focused' : ''} ${this.props.className || ''}` }
|
113
|
119
|
data-testid = { this.props.testId ? this.props.testId : undefined }
|
114
|
120
|
onBlur = { this._onBlur }
|