File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
apps/site/components/Downloads/Release
packages/ui-components/src/Common/Select Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ const InstallationMethodDropdown: FC = () => {
8080 ariaLabel = { t ( 'layouts.download.dropdown.platform' ) }
8181 onChange = { platform => platform && release . setInstallMethod ( platform ) }
8282 className = "min-w-28"
83+ dropdownClassName = "!max-h-none"
8384 inline = { true }
8485 />
8586 ) ;
Original file line number Diff line number Diff line change @@ -39,6 +39,12 @@ type SelectProps<T extends string> = {
3939 inline ?: boolean ;
4040 onChange ?: ( value : T ) => void ;
4141 className ?: string ;
42+ /**
43+ * Allows passing custom CSS classes to the dropdown container element.
44+ * This is useful for overriding default styles, such as adjusting `max-height`.
45+ * The dropdown is rendered within a `Portal`.
46+ */
47+ dropdownClassName ?: string ;
4248 ariaLabel ?: string ;
4349 loading ?: boolean ;
4450 disabled ?: boolean ;
@@ -52,6 +58,7 @@ const Select = <T extends string>({
5258 inline,
5359 onChange,
5460 className,
61+ dropdownClassName,
5562 ariaLabel,
5663 loading = false ,
5764 disabled = false ,
@@ -166,9 +173,11 @@ const Select = <T extends string>({
166173 < SelectPrimitive . Portal >
167174 < SelectPrimitive . Content
168175 position = { inline ? 'popper' : 'item-aligned' }
169- className = { classNames ( styles . dropdown , {
170- [ styles . inline ] : inline ,
171- } ) }
176+ className = { classNames (
177+ styles . dropdown ,
178+ { [ styles . inline ] : inline } ,
179+ dropdownClassName
180+ ) }
172181 >
173182 < SelectPrimitive . ScrollUpButton >
174183 < ChevronUpIcon className = { styles . scrollIcon } />
You can’t perform that action at this time.
0 commit comments