[Issue][maz-phone-number-input] update not behaving well when change the country code
Wadhah-Sky opened this issue · comments
Describe the bug
onUpdate
event not working well when valid phone number have been set, then you change the country code.
To Reproduce
Select US country code and set a valid phone number, then change to UK country code, the onUpdate
event will trigger with US
country code and isValid=true
NOT with UK
country code and isVaild=false
.
Expected behavior
Should reset the $event
to be:
{
"isValid": false,
"countryCode": "UK"
}
I had the same issue using the update
event, so I used country-code
instead.
Unlike the update
event, country-code
event passed the correct country code.
In my case I just reset the modelValue(phone number) on country code change using country-code
event, but I think it you can also manipulate the phone number validity using country-code
in some way. 🤔
This bug is fixed is v3.19.0
Changelog: https://github.com/LouisMazel/maz-ui/releases/tag/v3.19.0