feat: full screen form for mobile

This commit is contained in:
2025-07-18 15:06:50 +04:00
parent e033938a03
commit 964641a58d
11 changed files with 71 additions and 12 deletions

View File

@ -41,6 +41,7 @@ const PhoneInput = ({
initialData.current.localValue
);
const inputRef = useRef<HTMLInputElement>(null);
const [dropdownWidth, setDropdownWidth] = useState<number>(300);
const lastNotifiedValue = useRef<string | null>(value ?? "");
@ -71,6 +72,11 @@ const PhoneInput = ({
const { readOnly, disabled } = props;
const leftSectionWidth = 90;
useEffect(() => {
if (!inputRef.current?.offsetWidth) return;
setDropdownWidth(inputRef.current?.offsetWidth);
}, [inputRef.current?.offsetWidth]);
return (
<InputBase
{...props}
@ -89,6 +95,7 @@ const PhoneInput = ({
}
}}
leftSectionWidth={leftSectionWidth}
inputWidth={dropdownWidth}
/>
}
leftSectionWidth={leftSectionWidth}