From 7ab705a36c3cb233fc01ea76469f88fe0b8291b7 Mon Sep 17 00:00:00 2001 From: Roy Schut Date: Thu, 17 Jun 2021 14:41:09 +0200 Subject: [PATCH] feat(project): skip filtering when only 1 item --- src/components/Filter/Filter.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/Filter/Filter.tsx b/src/components/Filter/Filter.tsx index f12194388..78958b8c0 100644 --- a/src/components/Filter/Filter.tsx +++ b/src/components/Filter/Filter.tsx @@ -20,10 +20,9 @@ const Filter: FC = ({ name, value, defaultLabel, options, setValue }) => const [isFilterModalOpen, openFilterModal] = useState(false); const breakpoint: Breakpoint = useBreakpoint(); - if (!options.length) { + if (options.length < 2) { return null; } - const handleChange = (event: React.ChangeEvent) => setValue(event.target.value); const handleOnClick = () => {