Skip to content

Commit ca654e4

Browse files
committed
prevent dropdown height from exceeding viewport height
1 parent 7891aa4 commit ca654e4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

components/dash-core-components/src/fragments/Dropdown.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,9 @@ const Dropdown = (props: DropdownProps) => {
436436
onOpenAutoFocus={e => e.preventDefault()}
437437
onKeyDown={handleKeyDown}
438438
style={{
439-
maxHeight: maxHeight ? `${maxHeight}px` : 'auto',
439+
maxHeight: maxHeight
440+
? `min(${maxHeight}px, calc(100vh - 100px))`
441+
: 'calc(100vh - 100px)',
440442
}}
441443
>
442444
{searchable && (

0 commit comments

Comments
 (0)