diff --git a/packages/core/src/components/collections/FilterControl.tsx b/packages/core/src/components/collections/FilterControl.tsx index 63014946..0041625e 100644 --- a/packages/core/src/components/collections/FilterControl.tsx +++ b/packages/core/src/components/collections/FilterControl.tsx @@ -2,11 +2,11 @@ import React, { useCallback, useMemo } from 'react'; import { translate } from 'react-polyglot'; import Menu from '../common/menu/Menu'; -import MenuItemButton from '../common/menu/MenuItemButton'; import MenuGroup from '../common/menu/MenuGroup'; +import MenuItemButton from '../common/menu/MenuItemButton'; import type { FilterMap, TranslatedProps, ViewFilter } from '@staticcms/core/interface'; -import type { ChangeEvent, MouseEvent } from 'react'; +import type { MouseEvent } from 'react'; interface FilterControlProps { filter: Record; @@ -23,7 +23,7 @@ const FilterControl = ({ const anyActive = useMemo(() => Object.keys(filter).some(key => filter[key]?.active), [filter]); const handleFilterClick = useCallback( - (viewFilter: ViewFilter) => (event: MouseEvent | ChangeEvent) => { + (viewFilter: ViewFilter) => (event: MouseEvent) => { event.stopPropagation(); event.preventDefault(); onFilterClick(viewFilter); @@ -43,17 +43,15 @@ const FilterControl = ({ return ( -