diff --git a/frontend/src/components/shared/CategoryFilterBar.tsx b/frontend/src/components/shared/CategoryFilterBar.tsx index bc00140..bee958d 100644 --- a/frontend/src/components/shared/CategoryFilterBar.tsx +++ b/frontend/src/components/shared/CategoryFilterBar.tsx @@ -118,7 +118,6 @@ export default function CategoryFilterBar({ onSearchChange, }: CategoryFilterBarProps) { const [otherOpen, setOtherOpen] = useState(false); - const [searchCollapsed, setSearchCollapsed] = useState(false); const searchInputRef = useRef(null); const isAllActive = activeFilters.length === 0; @@ -129,16 +128,6 @@ export default function CategoryFilterBar({ useSensor(PointerSensor, { activationConstraint: { distance: 5 } }), ); - // Collapse search if there are many categories - useEffect(() => { - setSearchCollapsed(categories.length >= 4); - }, [categories.length]); - - const handleExpandSearch = () => { - setSearchCollapsed(false); - setTimeout(() => searchInputRef.current?.focus(), 50); - }; - const handleDragEnd = (event: DragEndEvent) => { const { active, over } = event; if (!over || active.id === over.id || !onReorderCategories) return; @@ -254,32 +243,18 @@ export default function CategoryFilterBar({
{/* Search */} - {searchCollapsed ? ( - - ) : ( -
- - onSearchChange(e.target.value)} - onBlur={() => { - if (!searchValue && categories.length >= 4) setSearchCollapsed(true); - }} - className="w-44 h-8 pl-8 text-sm ring-inset" - aria-label="Search" - /> -
- )} +
+ + onSearchChange(e.target.value)} + className="w-52 h-8 pl-8 text-sm" + aria-label="Search" + /> +
); }