diff --git a/apps/web/src/components/ui/ProjectCombobox.tsx b/apps/web/src/components/ui/ProjectCombobox.tsx index 731c7cc..fe95453 100644 --- a/apps/web/src/components/ui/ProjectCombobox.tsx +++ b/apps/web/src/components/ui/ProjectCombobox.tsx @@ -17,7 +17,7 @@ interface ProjectComboboxProps { export function ProjectCombobox({ value, onChange, - placeholder = "Search project…", + placeholder = "Search project\u2026", disabled = false, status, className = "", @@ -43,9 +43,9 @@ export function ProjectCombobox({ const selectedLabel = useMemo(() => { if (!value) return ""; const fromOpen = projects.find((p) => p.id === value); - if (fromOpen) return `${fromOpen.shortCode} — ${fromOpen.name}`; + if (fromOpen) return `${fromOpen.shortCode} \u2014 ${fromOpen.name}`; const fromAll = allData?.projects.find((p) => p.id === value); - if (fromAll) return `${fromAll.shortCode} — ${fromAll.name}`; + if (fromAll) return `${fromAll.shortCode} \u2014 ${fromAll.name}`; return value; }, [value, projects, allData]); @@ -61,72 +61,68 @@ export function ProjectCombobox({ return () => document.removeEventListener("mousedown", handleClick); }, [open]); - function handleOpen() { + function handleFocus() { if (disabled) return; setOpen(true); setSearch(""); - setTimeout(() => inputRef.current?.focus(), 0); } function select(id: string | null) { onChange(id); setOpen(false); setSearch(""); + inputRef.current?.blur(); } return (
- )} - +
{open && ( -
-
- setSearch(e.target.value)} - placeholder="Type to search…" - className="w-full px-2 py-1 text-sm border-0 outline-none" - /> -
+