We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e8c61c commit 16e5db9Copy full SHA for 16e5db9
projects/packages/forms/src/modules/field-phone/view.js
@@ -77,8 +77,11 @@ const { actions } = store( NAMESPACE, {
77
},
78
onPhoneCountryChange( event ) {
79
const context = getContext();
80
- context.countryPrefix = countries.find( item => item.code === event?.target?.value )?.value;
81
context.phoneCountryCode = event?.target?.value || context.defaultCountry;
+ context.countryPrefix = countries.find(
82
+ item => item.code === context.phoneCountryCode
83
+ )?.value;
84
+ asYouTypes[ context.fieldId ] = new AsYouType( context.phoneCountryCode );
85
context.fullPhoneNumber = context.countryPrefix + ' ' + context.phoneNumber;
86
87
0 commit comments