Skip to content

Commit

Permalink
fix empty actions popover button (elastic#110015) (elastic#110031)
Browse files Browse the repository at this point in the history
Co-authored-by: Sergi Massaneda <[email protected]>
  • Loading branch information
kibanamachine and semd authored Aug 25, 2021
1 parent 229d735 commit 8ebbac7
Showing 1 changed file with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,18 +217,22 @@ function ObservabilityActions({

const actionsMenuItems = useMemo(() => {
return [
timelines.getAddToExistingCaseButton({
event,
casePermissions,
appId: observabilityFeatureId,
onClose: afterCaseSelection,
}),
timelines.getAddToNewCaseButton({
event,
casePermissions,
appId: observabilityFeatureId,
onClose: afterCaseSelection,
}),
...(casePermissions?.crud
? [
timelines.getAddToExistingCaseButton({
event,
casePermissions,
appId: observabilityFeatureId,
onClose: afterCaseSelection,
}),
timelines.getAddToNewCaseButton({
event,
casePermissions,
appId: observabilityFeatureId,
onClose: afterCaseSelection,
}),
]
: []),
...(alertPermissions.crud ? statusActionItems : []),
];
}, [afterCaseSelection, casePermissions, timelines, event, statusActionItems, alertPermissions]);
Expand Down

0 comments on commit 8ebbac7

Please sign in to comment.