diff --git a/packages/twenty-front/src/modules/ui/input/components/Select.tsx b/packages/twenty-front/src/modules/ui/input/components/Select.tsx index 21e1fb4ee..54c9b1a79 100644 --- a/packages/twenty-front/src/modules/ui/input/components/Select.tsx +++ b/packages/twenty-front/src/modules/ui/input/components/Select.tsx @@ -31,6 +31,7 @@ export type SelectProps = { disableBlur?: boolean; dropdownId: string; dropdownWidth?: `${string}px` | 'auto' | number; + dropdownWidthAuto?: boolean; emptyOption?: SelectOption; fullWidth?: boolean; label?: string; @@ -60,6 +61,7 @@ export const Select = ({ disableBlur = false, dropdownId, dropdownWidth = 176, + dropdownWidthAuto = false, emptyOption, fullWidth, label, @@ -94,6 +96,11 @@ export const Select = ({ const { closeDropdown } = useDropdown(dropdownId); + const dropDownMenuWidth = + dropdownWidthAuto && selectContainerRef.current?.clientWidth + ? selectContainerRef.current?.clientWidth + : dropdownWidth; + return ( ({ ) : (