Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

fix contact autocomplete overflows horizontally

Jean-Baptiste Kaiser73f652c42bf1
diff --git a/src/components/admin/autocomplete-input.tsx b/src/components/admin/autocomplete-input.tsx
index 5b9b4a79..7ef13508 100644
--- a/src/components/admin/autocomplete-input.tsx
+++ b/src/components/admin/autocomplete-input.tsx
@@ -220,7 +220,7 @@ export const AutocompleteInput = (
variant="outline"
role="combobox"
aria-expanded={open}
- className="w-full justify-between h-auto py-1.75 font-normal"
+ className="min-w-0 max-w-full justify-between h-auto py-1.75 font-normal"
>
{selectedChoice ? (
getInputText(selectedChoice)
@@ -230,7 +230,7 @@ export const AutocompleteInput = (
<ChevronsUpDown className="ml-2 h-4 w-4 shrink-0 opacity-50" />
</Button>
</PopoverTrigger>
- <PopoverContent className="w-full p-0">
+ <PopoverContent className="min-w-0 max-w-full p-0">
{/* We handle the filtering ourselves */}
<Command shouldFilter={!isFromReference}>
<CommandInput
diff --git a/src/components/atomic-crm/misc/ContactOption.tsx b/src/components/atomic-crm/misc/ContactOption.tsx
index a1e8671b..aeb9e1e5 100644
--- a/src/components/atomic-crm/misc/ContactOption.tsx
+++ b/src/components/atomic-crm/misc/ContactOption.tsx
@@ -8,7 +8,7 @@ const ContactOptionRender = () => {
const record: Contact | undefined = useRecordContext();
if (!record) return null;
return (
- <div className="flex flex-row gap-4 items-center justify-start">
+ <div className="flex flex-row gap-4 items-center justify-start whitespace-normal text-left">
<Avatar height={40} width={40} record={record} />
<div className="flex flex-col items-start gap-1">
<span>