Skip to content

Commit

Permalink
remove setting default values for facets
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiryous committed Nov 17, 2024
1 parent cd30eba commit 2685e99
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions keep-ui/app/alerts/alert-table-alert-facets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,22 +171,6 @@ export const AlertFacets: React.FC<AlertFacetsProps> = ({
"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,
Expand Down

0 comments on commit 2685e99

Please sign in to comment.