From 3f0e41cd93e023afce2ab5d196ecaef5b08f3234 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Wed, 16 Jun 2021 08:34:59 -0400 Subject: [PATCH] Alerting: Don't reset value when changing evaluator method on classic condition (#35750) (#35814) (cherry picked from commit 407bd2d619751a14c6331b07efa6ada57db7db0e) Co-authored-by: Peter Holmberg --- public/app/features/expressions/components/Condition.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/features/expressions/components/Condition.tsx b/public/app/features/expressions/components/Condition.tsx index dd2a8129a3d..2987a2aaa04 100644 --- a/public/app/features/expressions/components/Condition.tsx +++ b/public/app/features/expressions/components/Condition.tsx @@ -44,7 +44,7 @@ export const Condition: FC = ({ condition, index, onChange, onRemoveCondi const onEvalFunctionChange = (evalFunction: SelectableValue) => { onChange({ ...condition, - evaluator: { params: [], type: evalFunction.value! }, + evaluator: { params: condition.evaluator.params, type: evalFunction.value! }, }); };