From 69fe2def894bb1aab46696a41fd6de38ed81b3e6 Mon Sep 17 00:00:00 2001 From: Domas Date: Tue, 2 Nov 2021 16:18:35 +0200 Subject: [PATCH] Alerting: Fix duplicating queries in rule editor (#41091) --- .../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)}