diff --git a/src/Utilities/DynamicFieldsUtils.res b/src/Utilities/DynamicFieldsUtils.res index 1b9e24f5e..caaf98e19 100644 --- a/src/Utilities/DynamicFieldsUtils.res +++ b/src/Utilities/DynamicFieldsUtils.res @@ -461,7 +461,7 @@ let useRequiredFieldsBody = ( } } - React.useEffect3(() => { + React.useEffect1(() => { let requiredFieldsBody = requiredFields ->Js.Array2.filter(item => item.field_type !== None) @@ -492,11 +492,23 @@ let useRequiredFieldsBody = ( setRequiredFieldsBody(_ => requiredFieldsBody) None - }, ( - requiredFields, - [fullName, email, line1, line2, city, postalCode, state, blikCode, phone, billingName], - [currency, country, cardNumber, cardExpiry, cvcNumber], - )) + }, [ + fullName.value, + email.value, + line1.value, + line2.value, + city.value, + postalCode.value, + state.value, + blikCode.value, + phone.value, + currency, + billingName.value, + country, + cardNumber, + cardExpiry, + cvcNumber, + ]) } let isFieldTypeToRenderOutsideBilling = (fieldType: PaymentMethodsRecord.paymentMethodsFields) => {