Skip to content

Commit 2cd4753

Browse files
authored
Limit DropdownMenu height to 80% of viewport (RooCodeInc#2181)
make DropdownMenu scrollable with 80vh height limit The DropdownMenu component now automatically becomes scrollable when its content exceeds 80% of the viewport height. This enhances usability by: - Limiting maximum height to 80vh using Tailwind's max-h-[80vh] - Enabling vertical scrolling with overflow-y-auto - Preserving dropdown positioning and accessibility
1 parent e189b26 commit 2cd4753

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webview-ui/src/components/ui/select-dropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export const SelectDropdown = React.forwardRef<React.ElementRef<typeof DropdownM
106106
onEscapeKeyDown={() => setOpen(false)}
107107
onInteractOutside={() => setOpen(false)}
108108
container={portalContainer}
109-
className={contentClassName}>
109+
className={cn("overflow-y-auto max-h-[80vh]", contentClassName)}>
110110
{options.map((option, index) => {
111111
if (option.type === DropdownOptionType.SEPARATOR) {
112112
return <DropdownMenuSeparator key={`sep-${index}`} />

0 commit comments

Comments
 (0)