@@ -45,8 +45,10 @@ export class StepLogistics extends Component {
4545 hasMatchingIndices : PropTypes . bool . isRequired ,
4646 indexPatternAsyncErrors : PropTypes . array ,
4747 } ;
48+ state = { cronFocus : false } ;
4849
4950 showAdvancedCron = ( ) => {
51+ this . setState ( { cronFocus : true } ) ;
5052 const { onFieldsChange } = this . props ;
5153
5254 onFieldsChange ( {
@@ -55,6 +57,7 @@ export class StepLogistics extends Component {
5557 } ;
5658
5759 hideAdvancedCron = ( ) => {
60+ this . setState ( { cronFocus : true } ) ;
5861 const { onFieldsChange, fields } = this . props ;
5962 const { simpleRollupCron } = fields ;
6063
@@ -156,6 +159,7 @@ export class StepLogistics extends Component {
156159 fullWidth
157160 >
158161 < EuiFieldText
162+ autoFocus = { this . state . cronFocus }
159163 value = { rollupCron }
160164 onChange = { ( e ) => onFieldsChange ( { rollupCron : e . target . value } ) }
161165 isInvalid = { Boolean ( areStepErrorsVisible && errorRollupCron ) }
@@ -181,6 +185,7 @@ export class StepLogistics extends Component {
181185 return (
182186 < Fragment >
183187 < CronEditor
188+ autoFocus = { this . state . cronFocus }
184189 fieldToPreferredValueMap = { fieldToPreferredValueMap }
185190 cronExpression = { rollupCron }
186191 frequency = { cronFrequency }
0 commit comments