From dfec8df31e883467392db8cd3b9a8e3bcbcc3810 Mon Sep 17 00:00:00 2001 From: Mythie Date: Fri, 8 Dec 2023 20:18:28 +1100 Subject: [PATCH] fix: ensure command menu results are distinct --- apps/web/src/components/(dashboard)/common/command-menu.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/web/src/components/(dashboard)/common/command-menu.tsx b/apps/web/src/components/(dashboard)/common/command-menu.tsx index ab0bba6af..2e352b45a 100644 --- a/apps/web/src/components/(dashboard)/common/command-menu.tsx +++ b/apps/web/src/components/(dashboard)/common/command-menu.tsx @@ -79,8 +79,7 @@ export function CommandMenu({ open, onOpenChange }: CommandMenuProps) { return searchDocumentsData.map((document) => ({ label: document.title, path: `/documents/${document.id}`, - value: - document.title + ' ' + document.Recipient.map((recipient) => recipient.email).join(' '), + value: [document.id, document.title, ...document.Recipient.map((r) => r.email)].join(' '), })); }, [searchDocumentsData]);