From ed531bb4c2ae74bdc7ec34bd5cf7bb11346d417b Mon Sep 17 00:00:00 2001 From: Oliver Gupte Date: Tue, 12 Jan 2021 21:15:27 -0800 Subject: [PATCH] Closes #85328. Adds 'repositionOnScroll' prop to expression popovers (#88085) --- .../alerting/service_alert_trigger/popover_expression/index.tsx | 1 + .../public/common/expression_items/for_the_last.tsx | 1 + .../public/common/expression_items/group_by_over.tsx | 1 + .../triggers_actions_ui/public/common/expression_items/of.tsx | 1 + .../public/common/expression_items/threshold.tsx | 1 + .../triggers_actions_ui/public/common/expression_items/when.tsx | 1 + 6 files changed, 6 insertions(+) diff --git a/x-pack/plugins/apm/public/components/alerting/service_alert_trigger/popover_expression/index.tsx b/x-pack/plugins/apm/public/components/alerting/service_alert_trigger/popover_expression/index.tsx index a95ea3cf11e7..48e9b540a2d1 100644 --- a/x-pack/plugins/apm/public/components/alerting/service_alert_trigger/popover_expression/index.tsx +++ b/x-pack/plugins/apm/public/components/alerting/service_alert_trigger/popover_expression/index.tsx @@ -30,6 +30,7 @@ export function PopoverExpression(props: Props) { onClick={() => setPopoverOpen(true)} /> } + repositionOnScroll > {children} diff --git a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/for_the_last.tsx b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/for_the_last.tsx index 388f87cbf752..417362ead76c 100644 --- a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/for_the_last.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/for_the_last.tsx @@ -84,6 +84,7 @@ export const ForLastExpression = ({ ownFocus display={display === 'fullWidth' ? 'block' : 'inlineBlock'} anchorPosition={popupPosition ?? 'downLeft'} + repositionOnScroll >
setAlertDurationPopoverOpen(false)}> diff --git a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/group_by_over.tsx b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/group_by_over.tsx index 785df0981ebe..94fdd027e38f 100644 --- a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/group_by_over.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/group_by_over.tsx @@ -115,6 +115,7 @@ export const GroupByExpression = ({ ownFocus display={display === 'fullWidth' ? 'block' : 'inlineBlock'} anchorPosition={popupPosition ?? 'downRight'} + repositionOnScroll >
setGroupByPopoverOpen(false)}> diff --git a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/of.tsx b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/of.tsx index e15b9a21570c..c6da09ea716c 100644 --- a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/of.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/of.tsx @@ -104,6 +104,7 @@ export const OfExpression = ({ display={display === 'fullWidth' ? 'block' : 'inlineBlock'} anchorPosition={popupPosition ?? 'downRight'} zIndex={8000} + repositionOnScroll >
setAggFieldPopoverOpen(false)}> diff --git a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/threshold.tsx b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/threshold.tsx index 8fabf4e9aeb2..8f186a87bb83 100644 --- a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/threshold.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/threshold.tsx @@ -111,6 +111,7 @@ export const ThresholdExpression = ({ ownFocus display={display === 'fullWidth' ? 'block' : 'inlineBlock'} anchorPosition={popupPosition ?? 'downLeft'} + repositionOnScroll >
setAlertThresholdPopoverOpen(false)}> diff --git a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/when.tsx b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/when.tsx index 5696417f241f..1fb1e0767b29 100644 --- a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/when.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/when.tsx @@ -67,6 +67,7 @@ export const WhenExpression = ({ ownFocus display={display === 'fullWidth' ? 'block' : 'inlineBlock'} anchorPosition={popupPosition ?? 'downLeft'} + repositionOnScroll >
setAggTypePopoverOpen(false)}>