You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Subsequently, I receive a phone number, for example: "+380987654321". I pass this number to parsePhoneNumber: const pn = parsePhoneNumber(value);
Then, I propagate the necessary values into the code select and the input field:
if (pn.countryCode) {
setCode(`+${pn.countryCode}`);
}
if (pn.number?.significant) {
setInputValue(pn.number.significant);
}
My objective is to have the country code in the select as "+380" and the remaining part of the number in the input, where I am utilizing significant.
Question: Do you have a ready solution or recommendations on how to implement the significant part with a mask?
The text was updated successfully, but these errors were encountered:
I am working on a design that includes a select dropdown for country codes. I obtain the codes using the following approach:
Subsequently, I receive a phone number, for example: "+380987654321". I pass this number to parsePhoneNumber:
const pn = parsePhoneNumber(value);
Then, I propagate the necessary values into the code select and the input field:
My objective is to have the country code in the select as "+380" and the remaining part of the number in the input, where I am utilizing significant.
Question: Do you have a ready solution or recommendations on how to implement the significant part with a mask?
The text was updated successfully, but these errors were encountered: