[v9.3.x] Alerting: Fix QueryAndExpressionStep not using the right query (#61796)

Alerting: Fix QueryAndExpressionStep not using the right query (#61738)

Fix QueryAndExpressionStep not using the right query

(cherry picked from commit a6102105af)

Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2023-01-19 17:52:52 +01:00
committed by GitHub
co-authored by Sonia Aguilar
parent 056ef7da7f
commit 6ba3cceb79
@@ -67,8 +67,8 @@ export const QueryAndExpressionsStep: FC<Props> = ({ 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(() => {