LouisMazel / vue-phone-number-input

A phone number input made with Vue JS (format & valid phone number)

Home Page:https://louismazel.github.io/vue-phone-number-input

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

(BUG) Wrong country set on load

ghostlexly opened this issue · comments

Describe the bug

If we set a value as "+262781208080" on the v-model and the browser's country is +33, when the input finish loading, it's will set back the browser's country code (+33) instead of (+262) which we sent on the v-model.

Steps to reproduce

  1. Set "+262781208080" as value in the v-model for Reunion country.
  2. Change browser's country to another country (like France for +33)
  3. Reload the page

The country will be set back to France +33 instead of Reunion.

Expected behavior

Use the setten country's code (Reunion) instead of the browser's one.
If no value is set, use the browser's country.

commented

Same issue here

commented

Hi guys,

This package is unmaintened
A new version of this plugin is available on my new library Maz-UI

to quick fix this use this props with no default country prop set and will work

 :fetch-country="false"
 :no-use-browser-locale="true"   

the last one works)