diff --git a/client/src/components/Planner/PlacesSidebar.tsx b/client/src/components/Planner/PlacesSidebar.tsx index bc959f0d..d9534bd3 100644 --- a/client/src/components/Planner/PlacesSidebar.tsx +++ b/client/src/components/Planner/PlacesSidebar.tsx @@ -28,7 +28,7 @@ interface PlacesSidebarProps { onDeletePlace: (placeId: number) => void days: Day[] isMobile: boolean - onCategoryFilterChange?: (categoryId: string) => void + onCategoryFilterChange?: (categoryIds: Set) => void onPlacesFilterChange?: (filter: string) => void pushUndo?: (label: string, undoFn: () => Promise | void) => void } @@ -105,8 +105,7 @@ const PlacesSidebar = React.memo(function PlacesSidebar({ setCategoryFiltersLocal(prev => { const next = new Set(prev) if (next.has(catId)) next.delete(catId); else next.add(catId) - // Notify parent with first selected or empty - onCategoryFilterChange?.(next.size === 1 ? [...next][0] : '') + onCategoryFilterChange?.(next) return next }) } @@ -257,7 +256,7 @@ const PlacesSidebar = React.memo(function PlacesSidebar({ ) })} {categoryFilters.size > 0 && ( -