From 7ef2299da4dba420c1c8e4c45adedb2fe24064e9 Mon Sep 17 00:00:00 2001 From: JavidSumra <112365664+JavidSumra@users.noreply.github.com> Date: Wed, 11 Dec 2024 12:46:56 +0530 Subject: [PATCH] Fix Infinite render on country code change (#9337) --- src/components/Form/FormFields/PhoneNumberFormField.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Form/FormFields/PhoneNumberFormField.tsx b/src/components/Form/FormFields/PhoneNumberFormField.tsx index 0fd6f914035..8b6566de8f7 100644 --- a/src/components/Form/FormFields/PhoneNumberFormField.tsx +++ b/src/components/Form/FormFields/PhoneNumberFormField.tsx @@ -105,7 +105,7 @@ const PhoneNumberFormField = React.forwardRef( } setCountry(phoneCodes[getCountryCode(field.value)!]); } - }, [setValue]); + }, [field.value]); return (