LouisMazel / maz-ui

Vue & Nuxt library of standalone components & tools to build interfaces

Home Page:https://maz-ui.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Country select does not change if country-code prop is set] [MazPhoneNumberInput]

jannkasper opened this issue · comments

Describe the bug

This code should make France as a default countryCode, but countryCode is based on my browser language. Cannot change it anyway.

  <MazPhoneNumberInput
    country-code="FR"
  />

You can see this even in your documentation. CountryCode is based on my browser language even when your code sample set 'FR'

Screenshots
Screenshot 2024-01-03 at 11 12 23

Hi @jannkasper,

Thanks for your feedback.
I just released a new version v3.31.4 to fix this issue.

N.B:

  • The component uses the browser locale if no country code is provided. You can disable it by adding the prop no-use- browser-locale
  • The country code prop is a model, you may use it like this: <MazPhoneNumberInput v-model:country-code="countryCode" />
  • You can also add the prop fetch-country to get the user's locale with his IP (with https://ipwho.is) and not the browser locale.