From 0e87adbc97f9d6455fa00f8baf76d4087399e389 Mon Sep 17 00:00:00 2001 From: Tom Ratcliffe Date: Thu, 28 Mar 2024 15:21:29 +0000 Subject: [PATCH] Remove await from dispatch --- .../alerting/unified/components/rules/RuleActionsButtons.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/features/alerting/unified/components/rules/RuleActionsButtons.tsx b/public/app/features/alerting/unified/components/rules/RuleActionsButtons.tsx index d8ea8bb93a9..cf66b4b76b7 100644 --- a/public/app/features/alerting/unified/components/rules/RuleActionsButtons.tsx +++ b/public/app/features/alerting/unified/components/rules/RuleActionsButtons.tsx @@ -131,14 +131,14 @@ export const RuleActionsButtons = ({ rule, rulesSource }: Props) => { moreActions.push( { + onPauseChange={() => { // Uses INSTANCES_DISPLAY_LIMIT + 1 here as exporting LIMIT_ALERTS from RuleList has the side effect // of breaking some unrelated tests in Policy.test.tsx due to mocking approach const limitAlerts = hasActiveFilters ? undefined : INSTANCES_DISPLAY_LIMIT + 1; // Trigger a re-fetch of the rules table // TODO: Migrate rules table functionality to RTK Query, so we instead rely // on tag invalidation (or optimistic cache updates) for this - await dispatch(fetchAllPromAndRulerRulesAction(false, { limitAlerts })); + dispatch(fetchAllPromAndRulerRulesAction(false, { limitAlerts })); }} /> );