File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 6
6
EuiToolTip ,
7
7
} from '@elastic/eui'
8
8
import React , { ReactElement } from 'react'
9
+ import { isUndefined } from 'lodash'
9
10
import { useDispatch , useSelector } from 'react-redux'
10
11
import AutoSizer from 'react-virtualized-auto-sizer'
11
12
@@ -47,7 +48,7 @@ export interface KeyDetailsHeaderProps {
47
48
isFullScreen : boolean
48
49
arePanelsCollapsed : boolean
49
50
onToggleFullScreen : ( ) => void
50
- Actions : ( props : { width : number } ) => Nullable < ReactElement >
51
+ Actions ? : ( props : { width : number } ) => ReactElement
51
52
}
52
53
53
54
const KeyDetailsHeader = ( {
@@ -58,7 +59,7 @@ const KeyDetailsHeader = ({
58
59
onRemoveKey,
59
60
onEditKey,
60
61
keyType,
61
- Actions = ( ) => null ,
62
+ Actions,
62
63
} : KeyDetailsHeaderProps ) => {
63
64
const { loading, lastRefreshTime } = useSelector ( selectedKeySelector )
64
65
const {
@@ -186,7 +187,7 @@ const KeyDetailsHeader = ({
186
187
{ Object . values ( KeyTypes ) . includes ( keyType as KeyTypes ) && (
187
188
< KeyDetailsHeaderFormatter width = { width } />
188
189
) }
189
- { keyType && < Actions width = { width } /> }
190
+ { ! isUndefined ( Actions ) && < Actions width = { width } /> }
190
191
< KeyDetailsHeaderDelete onDelete = { handleDeleteKey } />
191
192
</ div >
192
193
</ EuiFlexItem >
You can’t perform that action at this time.
0 commit comments