diff --git a/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuItemsContainer.tsx b/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuItemsContainer.tsx index ca642bcc6..1a4a197c7 100644 --- a/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuItemsContainer.tsx +++ b/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuItemsContainer.tsx @@ -1,3 +1,4 @@ +import { ScrollWrapper } from '@/ui/utilities/scroll/components/ScrollWrapper'; import styled from '@emotion/styled'; const StyledDropdownMenuItemsExternalContainer = styled.div<{ @@ -26,6 +27,10 @@ const StyledDropdownMenuItemsInternalContainer = styled.div` width: 100%; `; +const StyledScrollWrapper = styled(ScrollWrapper)` + width: 100%; +`; + // TODO: refactor this, the dropdown should handle the max height behavior + scroll with the size middleware // We should instead create a DropdownMenuItemsContainerScrollable or take for granted that it is the default behavior export const DropdownMenuItemsContainer = ({ @@ -42,9 +47,17 @@ export const DropdownMenuItemsContainer = ({ hasMaxHeight={hasMaxHeight} className={className} > - - {children} - + {hasMaxHeight ? ( + + + {children} + + + ) : ( + + {children} + + )} ); };