Maybe I am wrong but I use an iPhoneNumberField with the .defaultRegion modifier. The parameter I pass to the modifier is a state variable (countryCode) that changes throughout the code (I have a custom country picker) but when I type the phone number it seems like it always formats it with the first one? What can I do to it so it changes the default region each time the countryCode variable changes?
Maybe I am wrong but I use an iPhoneNumberField with the .defaultRegion modifier. The parameter I pass to the modifier is a state variable (countryCode) that changes throughout the code (I have a custom country picker) but when I type the phone number it seems like it always formats it with the first one? What can I do to it so it changes the default region each time the countryCode variable changes?