From 150510bc8af8a00f34d00a55d880be3526f04ac8 Mon Sep 17 00:00:00 2001 From: Justin Date: Thu, 14 Jul 2022 14:08:59 -0400 Subject: [PATCH] Format number after changing country code --- app/soapbox/components/ui/phone-input/phone-input.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/soapbox/components/ui/phone-input/phone-input.tsx b/app/soapbox/components/ui/phone-input/phone-input.tsx index 89e9778ce..81d2723c4 100644 --- a/app/soapbox/components/ui/phone-input/phone-input.tsx +++ b/app/soapbox/components/ui/phone-input/phone-input.tsx @@ -59,6 +59,10 @@ const PhoneInput: React.FC = (props) => { } }, [countryCode, nationalNumber]); + useEffect(() => { + handleChange({ target: { value: nationalNumber } } as any); + }, [countryCode, nationalNumber]); + return (