Skip to content

fix(InstallationMethodDropdown): increase height #7989

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ const InstallationMethodDropdown: FC = () => {
ariaLabel={t('layouts.download.dropdown.platform')}
onChange={platform => platform && release.setInstallMethod(platform)}
className="min-w-28"
dropdownClassName="!max-h-none"
inline={true}
/>
);
Expand Down
15 changes: 12 additions & 3 deletions packages/ui-components/src/Common/Select/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ type SelectProps<T extends string> = {
inline?: boolean;
onChange?: (value: T) => void;
className?: string;
/**
* Allows passing custom CSS classes to the dropdown container element.
* This is useful for overriding default styles, such as adjusting `max-height`.
* The dropdown is rendered within a `Portal`.
*/
dropdownClassName?: string;
ariaLabel?: string;
loading?: boolean;
disabled?: boolean;
Expand All @@ -52,6 +58,7 @@ const Select = <T extends string>({
inline,
onChange,
className,
dropdownClassName,
ariaLabel,
loading = false,
disabled = false,
Expand Down Expand Up @@ -166,9 +173,11 @@ const Select = <T extends string>({
<SelectPrimitive.Portal>
<SelectPrimitive.Content
position={inline ? 'popper' : 'item-aligned'}
className={classNames(styles.dropdown, {
[styles.inline]: inline,
})}
className={classNames(
styles.dropdown,
{ [styles.inline]: inline },
dropdownClassName
)}
>
<SelectPrimitive.ScrollUpButton>
<ChevronUpIcon className={styles.scrollIcon} />
Expand Down