@@ -11,6 +11,7 @@ import {
1111 EuiFlexItem ,
1212 EuiButton ,
1313 EuiSpacer ,
14+ EuiText ,
1415} from '@elastic/eui' ;
1516import { findIndex } from 'lodash/fp' ;
1617import React , { FC , memo , useCallback , useEffect , useMemo } from 'react' ;
@@ -125,11 +126,8 @@ const StepRuleActionsComponent: FC<StepRuleActionsProps> = ({
125126 } , [ getData , setForm ] ) ;
126127
127128 const throttleOptions = useMemo ( ( ) => {
128- if ( application . capabilities . actions . show ) {
129- return getThrottleOptions ( throttle ) ;
130- }
131- return [ { value : DEFAULT_THROTTLE_OPTION . value , text : I18n . NO_ACTIONS_READ_PERMISSIONS } ] ;
132- } , [ throttle , application . capabilities . actions . show ] ) ;
129+ return getThrottleOptions ( throttle ) ;
130+ } , [ throttle ] ) ;
133131
134132 const throttleFieldComponentProps = useMemo (
135133 ( ) => ( {
@@ -151,7 +149,11 @@ const StepRuleActionsComponent: FC<StepRuleActionsProps> = ({
151149 ) : (
152150 < >
153151 < StepContentWrapper addPadding = { ! isUpdateView } >
154- < Form form = { form } data-test-subj = "stepRuleActions" >
152+ < Form
153+ form = { form }
154+ style = { { display : application . capabilities . actions . show ? 'block' : 'none' } }
155+ data-test-subj = "stepRuleActions"
156+ >
155157 < EuiForm >
156158 < UseField
157159 path = "throttle"
@@ -176,6 +178,9 @@ const StepRuleActionsComponent: FC<StepRuleActionsProps> = ({
176178 < UseField path = "enabled" component = { GhostFormField } />
177179 </ EuiForm >
178180 </ Form >
181+ { ! application . capabilities . actions . show && (
182+ < EuiText > { I18n . NO_ACTIONS_READ_PERMISSIONS } </ EuiText >
183+ ) }
179184 </ StepContentWrapper >
180185
181186 { ! isUpdateView && (
0 commit comments