Skip to content

Commit 39add83

Browse files
committed
fix(RHINENG-20424): fix clear filter bug with incident selected
1 parent fba8b08 commit 39add83

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

web/src/components/Incidents/ToolbarItemFilter.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
Badge,
1010
} from '@patternfly/react-core';
1111
import { getFilterKey } from './utils';
12+
import { setAlertsAreLoading } from '../../actions/observe';
1213

1314
interface IncidentFilterToolbarItemProps {
1415
categoryName: string;
@@ -66,11 +67,17 @@ const IncidentFilterToolbarItem: React.FC<IncidentFilterToolbarItemProps> = ({
6667
deleteLabel={(category, chip) => {
6768
if (typeof category === 'string' && typeof chip === 'string') {
6869
onDeleteIncidentFilterChip(category, chip, incidentsActiveFilters, dispatch);
70+
if (categoryName === 'Incident ID') {
71+
dispatch(setAlertsAreLoading({ alertsAreLoading: true }));
72+
}
73+
}
74+
}}
75+
deleteLabelGroup={(category) => {
76+
onDeleteGroupIncidentFilterChip(incidentsActiveFilters, dispatch, category);
77+
if (categoryName === 'Incident ID') {
78+
dispatch(setAlertsAreLoading({ alertsAreLoading: true }));
6979
}
7080
}}
71-
deleteLabelGroup={(category) =>
72-
onDeleteGroupIncidentFilterChip(incidentsActiveFilters, dispatch, category)
73-
}
7481
categoryName={categoryName}
7582
>
7683
<Select

0 commit comments

Comments
 (0)