From 7feec70dbabb75af1e871a37d664f5f90030b266 Mon Sep 17 00:00:00 2001 From: Nataly Merezhuk Date: Wed, 29 Jan 2025 16:47:48 -0500 Subject: [PATCH 1/3] Allows overflow on Dropdown.Content sets min-height on Dropdown.Item --- src/components/Dropdown/Dropdown.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/Dropdown/Dropdown.tsx b/src/components/Dropdown/Dropdown.tsx index 498ed5f7..2040ba10 100644 --- a/src/components/Dropdown/Dropdown.tsx +++ b/src/components/Dropdown/Dropdown.tsx @@ -12,6 +12,7 @@ export const Dropdown = (props: DropdownMenu.DropdownMenuProps) => ( const DropdownMenuItem = styled(GenericMenuItem)` position: relative; display: flex; + min-height: 32px; &[data-state="open"] { ${({ theme }) => ` font: ${theme.click.genericMenu.item.typography.label.hover}; @@ -93,6 +94,7 @@ const DropdownMenuContent = styled(GenericMenuPanel)` min-width: ${({ theme }) => theme.click.genericMenu.item.size.minWidth}; flex-direction: column; z-index: 1; + overflow-y: auto; `; const DropdownContent = ({ From ce031b24cfb3e433c636b3166a3feb449481b9cf Mon Sep 17 00:00:00 2001 From: Nataly Merezhuk Date: Fri, 31 Jan 2025 14:03:43 -0500 Subject: [PATCH 2/3] Adds max height to dropdown. --- src/components/Dropdown/Dropdown.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Dropdown/Dropdown.tsx b/src/components/Dropdown/Dropdown.tsx index 2040ba10..790a1f86 100644 --- a/src/components/Dropdown/Dropdown.tsx +++ b/src/components/Dropdown/Dropdown.tsx @@ -90,11 +90,13 @@ type DropdownSubContentProps = DropdownMenu.MenuSubContentProps & MainDropdownProps & ArrowProps; + console.log("Max height: ", ) const DropdownMenuContent = styled(GenericMenuPanel)` min-width: ${({ theme }) => theme.click.genericMenu.item.size.minWidth}; flex-direction: column; z-index: 1; - overflow-y: auto; + overflow-y: scroll; + max-height: calc((var(--radix-${({ $type }) => $type}-content-available-height) - 100px)) `; const DropdownContent = ({ From a31b8a66684e9fa6c4d86dda7e266587605b629c Mon Sep 17 00:00:00 2001 From: Nataly Merezhuk Date: Tue, 4 Feb 2025 08:45:45 -0500 Subject: [PATCH 3/3] Removes console.log --- src/components/Dropdown/Dropdown.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/Dropdown/Dropdown.tsx b/src/components/Dropdown/Dropdown.tsx index 790a1f86..5c796570 100644 --- a/src/components/Dropdown/Dropdown.tsx +++ b/src/components/Dropdown/Dropdown.tsx @@ -90,13 +90,14 @@ type DropdownSubContentProps = DropdownMenu.MenuSubContentProps & MainDropdownProps & ArrowProps; - console.log("Max height: ", ) const DropdownMenuContent = styled(GenericMenuPanel)` min-width: ${({ theme }) => theme.click.genericMenu.item.size.minWidth}; flex-direction: column; z-index: 1; overflow-y: scroll; - max-height: calc((var(--radix-${({ $type }) => $type}-content-available-height) - 100px)) + max-height: calc( + (var(--radix-${({ $type }) => $type}-content-available-height) - 100px) + ); `; const DropdownContent = ({