From 2685e9944bb5d2140f66a5a6ecd2d1e19992d332 Mon Sep 17 00:00:00 2001 From: Kirill Chernakov Date: Sun, 17 Nov 2024 15:10:26 +0400 Subject: [PATCH] remove setting default values for facets --- keep-ui/app/alerts/alert-table-alert-facets.tsx | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/keep-ui/app/alerts/alert-table-alert-facets.tsx b/keep-ui/app/alerts/alert-table-alert-facets.tsx index 2851e78a1..1366558b4 100644 --- a/keep-ui/app/alerts/alert-table-alert-facets.tsx +++ b/keep-ui/app/alerts/alert-table-alert-facets.tsx @@ -171,22 +171,6 @@ export const AlertFacets: React.FC = ({ "incident", ]; - // TODO: move to the alert-table.tsx - useEffect( - function setInitialFacetFilters() { - setFacetFilters((facetFilters) => { - return Object.keys(facetFilters).reduce((acc, key) => { - acc[key] = - facetFilters[key]?.length === 0 - ? getFacetValues(key as keyof AlertDto).map((v) => v.label) - : facetFilters[key]; - return acc; - }, {} as FacetFilters); - }); - }, - [getFacetValues, setFacetFilters] - ); - const handleAddFacet = (column: string) => { setDynamicFacets([ ...dynamicFacets,