Skip to content

Commit

Permalink
feat(project): skip filtering when only 1 item
Browse files Browse the repository at this point in the history
  • Loading branch information
royschut committed Jun 17, 2021
1 parent d776bf0 commit 7ab705a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/Filter/Filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ const Filter: FC<Props> = ({ 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<HTMLSelectElement>) => setValue(event.target.value);

const handleOnClick = () => {
Expand Down

0 comments on commit 7ab705a

Please sign in to comment.