Alerting: Fix updating condition when refId changes (#97753)

fix updating condition when refid changes
This commit is contained in:
Sonia Aguilar 2024-12-11 14:31:58 +01:00 committed by GitHub
parent 32155b22d6
commit 3c2c5610bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -269,10 +269,10 @@ export const QueryAndExpressionsStep = ({ editingExistingRule, onDataChange }: P
// update condition too if refId was updated
if (condition === oldRefId) {
handleSetCondition(newRefId);
setValue('condition', newRefId);
}
},
[condition, queries, handleSetCondition]
[condition, queries, setValue]
);
const updateExpressionAndDatasource = useSetExpressionAndDataSource();