fix: TimeZone dropdown clips through screen in Mobile viewport (#7935)

## Description

- This PR fixes the issue #7934

---------

Co-authored-by: martmull <martmull@hotmail.fr>
This commit is contained in:
Harshit Singh
2024-10-28 21:41:41 +05:30
committed by GitHub
parent ca54bc1813
commit cabae4c462
4 changed files with 12 additions and 2 deletions

View File

@ -31,6 +31,7 @@ export type SelectProps<Value extends string | number | null> = {
disableBlur?: boolean;
dropdownId: string;
dropdownWidth?: `${string}px` | 'auto' | number;
dropdownWidthAuto?: boolean;
emptyOption?: SelectOption<Value>;
fullWidth?: boolean;
label?: string;
@ -60,6 +61,7 @@ export const Select = <Value extends string | number | null>({
disableBlur = false,
dropdownId,
dropdownWidth = 176,
dropdownWidthAuto = false,
emptyOption,
fullWidth,
label,
@ -94,6 +96,11 @@ export const Select = <Value extends string | number | null>({
const { closeDropdown } = useDropdown(dropdownId);
const dropDownMenuWidth =
dropdownWidthAuto && selectContainerRef.current?.clientWidth
? selectContainerRef.current?.clientWidth
: dropdownWidth;
return (
<StyledContainer
className={className}
@ -111,7 +118,7 @@ export const Select = <Value extends string | number | null>({
) : (
<Dropdown
dropdownId={dropdownId}
dropdownMenuWidth={dropdownWidth}
dropdownMenuWidth={dropDownMenuWidth}
dropdownPlacement="bottom-start"
clickableComponent={
<SelectControl