fix: #15989 disable country prefill in phone input (#15991)

* default country disabled in phone input

* Update PhoneInput.tsx

* update event-types e2e

---------

Co-authored-by: Anik Dhabal Babu <[email protected]>
This commit is contained in:
VijayandAnik Dhabal Babu authored and GitHub committed 2024-07-31 00:20:37 +03:00
1 parent 41e565fcf8
commit d21c91c519
2 files changed
+2 -5

No files matched your search

-3
View File
@@ -18,13 +18,10 @@ export type PhoneInputProps = {
};
function BasePhoneInput({ name, className = "", onChange, value, ...rest }: PhoneInputProps) {
const defaultCountry = useDefaultCountry();
return (
<PhoneInput
{...rest}
value={value ? value.trim().replace(/^\+?/, "+") : undefined}
country={value ? undefined : defaultCountry}
enableSearch
disableSearchIcon
inputProps={{