From 26f155b86a034fa7f41eb087355820f1325581c5 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Wed, 3 Nov 2021 04:13:38 -0600 Subject: [PATCH] Alerting: Fix duplicating queries in rule editor (#41091) (#41203) (cherry picked from commit 69fe2def894bb1aab46696a41fd6de38ed81b3e6) Co-authored-by: Domas --- .../alerting/unified/components/rule-editor/QueryWrapper.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/features/alerting/unified/components/rule-editor/QueryWrapper.tsx b/public/app/features/alerting/unified/components/rule-editor/QueryWrapper.tsx index f0695f0cc15..be09fb6b12d 100644 --- a/public/app/features/alerting/unified/components/rule-editor/QueryWrapper.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/QueryWrapper.tsx @@ -79,7 +79,7 @@ export const QueryWrapper: FC = ({ query={cloneDeep(query.model)} onChange={(query) => onChangeQuery(query, index)} onRemoveQuery={onRemoveQuery} - onAddQuery={onDuplicateQuery} + onAddQuery={() => onDuplicateQuery(cloneDeep(query))} onRunQuery={onRunQueries} queries={queries} renderHeaderExtras={() => renderTimePicker(query, index)}