From c2c42dcc8b232bbdf22a763621b9e32eeeabb466 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sun, 19 Oct 2025 21:17:42 +0000 Subject: [PATCH] Add filters into grouped memo computation cgen-ae30366aaec741aa898be761085476e8 --- client/pages/ProjectBoard.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/client/pages/ProjectBoard.tsx b/client/pages/ProjectBoard.tsx index 221dead5..9426d916 100644 --- a/client/pages/ProjectBoard.tsx +++ b/client/pages/ProjectBoard.tsx @@ -72,11 +72,19 @@ export default function ProjectBoard() { done: [], blocked: [], }; - for (const t of tasks) { + const normalized = tasks.filter((t) => { + if (q && !String(t.title || "").toLowerCase().includes(q.toLowerCase()) && !String(t.description || "").toLowerCase().includes(q.toLowerCase())) { + return false; + } + if (filterAssignee && String(t.assignee_id || "") !== filterAssignee) return false; + if (filterStatus && String(t.status || "") !== filterStatus) return false; + return true; + }); + for (const t of normalized) { map[t.status || "todo"].push(t); } return map; - }, [tasks]); + }, [tasks, q, filterAssignee, filterStatus]); const handleCreate = async () => { if (!user?.id || !projectId) return;