From c39c84e9ce055190c7513435df5300be972774aa Mon Sep 17 00:00:00 2001 From: Christel Westerberg Date: Fri, 30 Aug 2024 11:58:23 +0200 Subject: [PATCH] fix: force dial code --- components/TempDesignSystem/Form/Phone/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/TempDesignSystem/Form/Phone/index.tsx b/components/TempDesignSystem/Form/Phone/index.tsx index 09438233b..df3d18c75 100644 --- a/components/TempDesignSystem/Form/Phone/index.tsx +++ b/components/TempDesignSystem/Form/Phone/index.tsx @@ -55,8 +55,12 @@ export default function Phone({ formState.defaultValues?.phoneNumber ).country?.toLowerCase() : "se", + disableDialCodeAndPrefix: true, forceDialCode: true, value: phone, + onChange: (value) => { + setValue(name, value.phone) + }, }) function handleSelectCountry(value: ParsedCountry) { @@ -65,7 +69,6 @@ export default function Phone({ function handleChange(evt: ChangeEvent) { handlePhoneValueChange(evt) - setValue(name, evt.target.value) } return (