diff --git a/components/ideas/idea-list.tsx b/components/ideas/idea-list.tsx index e457a02..2edac75 100644 --- a/components/ideas/idea-list.tsx +++ b/components/ideas/idea-list.tsx @@ -87,8 +87,14 @@ export function IdeaList({ ideas, products, isDemo }: IdeaListProps) { return ideas.filter((idea) => { if (q && !idea.title.toLowerCase().includes(q)) return false if (productFilter !== 'all') { - if (productFilter === 'none' && idea.product_id !== null) return false - if (productFilter !== 'none' && idea.product_id !== productFilter) return false + if (productFilter === 'none') { + if (idea.product_id !== null) return false + } else { + const matchesPrimary = idea.product_id === productFilter + const matchesSecondary = + idea.secondary_products?.some((sp) => sp.product_id === productFilter) ?? false + if (!matchesPrimary && !matchesSecondary) return false + } } if (statusFilter.size > 0 && !statusFilter.has(idea.status)) return false return true