diff --git a/public/app/features/alerting/unified/components/rule-editor/query-and-alert-condition/QueryAndExpressionsStep.tsx b/public/app/features/alerting/unified/components/rule-editor/query-and-alert-condition/QueryAndExpressionsStep.tsx index 96b113d21c2..ce06d292ea3 100644 --- a/public/app/features/alerting/unified/components/rule-editor/query-and-alert-condition/QueryAndExpressionsStep.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/query-and-alert-condition/QueryAndExpressionsStep.tsx @@ -67,8 +67,8 @@ export const QueryAndExpressionsStep: FC = ({ editingExistingRule }) => { }, []); const runQueries = useCallback(() => { - runner.current.run(queries); - }, [queries]); + runner.current.run(getValues('queries')); + }, [getValues]); // whenever we update the queries we have to update the form too useEffect(() => {