Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(BUG) Can't use it without v-model #163

Open
wug-ge opened this issue Nov 1, 2021 · 2 comments
Open

(BUG) Can't use it without v-model #163

wug-ge opened this issue Nov 1, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@wug-ge
Copy link

wug-ge commented Nov 1, 2021

I need the international number (with country code) always, the value emitted by v-model seems to only give the value of the phone number without a country code. (which can also be debated imho)

To get the international number, I'm listening for update events instead, so I'm not using the value in the v-model at all. I tried removing it, but then the input box doesn't work at all, is a v-model required?

If that's only a strange issue with my setup please tell me, it feels a bit ugly to have an unused variable only for an unused v-model.

Thanks in advance!

@wug-ge wug-ge added the bug Something isn't working label Nov 1, 2021
@GMartigny
Copy link

Minimal reproduction Codepen

See that for the second phone-input, it's not editable.

@AlexeyPlodenko
Copy link

For anyone who would come here from Google.

It is impossible to type in anything, as everything typed in being removed immediately. The input clears itself.

The solution is to set any v-model in the component: <vue-phone-number-input v-model="anyDummyDataModel" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants