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

Fix QueryAndExpressionStep not using the right query
This commit is contained in:
Sonia Aguilar 2023-01-19 17:33:32 +01:00 committed by GitHub
parent 3b718a3e8f
commit a6102105af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(() => {