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

I can't use the component as a directive in v-text-field #43

Closed
KammerR opened this issue Nov 6, 2019 · 6 comments
Closed

I can't use the component as a directive in v-text-field #43

KammerR opened this issue Nov 6, 2019 · 6 comments

Comments

@KammerR
Copy link

KammerR commented Nov 6, 2019

Hello. I tried to use v-currency as a directive (following the tutorial strictly, I just changed the input to v-text-field), but it didn't work (every time I entered a value, the same back to 0)

@dm4t2
Copy link
Owner

dm4t2 commented Nov 6, 2019

Hi, which version of Vuetify/Vue Currency Input are you using? Example code would also be helpful.

Here is working example using the latest versions:

Edit Using Vue Currency Input with Vuetify

@KammerR
Copy link
Author

KammerR commented Nov 6, 2019

I am using the latest version of all. I'm using Nuxt, I put vue-currency-input as a plugin (although I tried to put it as a module, just like in the configuration). I created a codesandbox with my repo.

https://codesandbox.io/s/github/KammerR/nuxtVcurrencyBuild/tree/master/basicNuxt

@dm4t2
Copy link
Owner

dm4t2 commented Nov 6, 2019

It works if you remove the "v-currency-field" plugin from your Nuxt config (which also registers a v-currency directive globally):

https://codesandbox.io/s/basicnuxt-cr993

@npolyakoff
Copy link

it seems like with Vuetify 1.5.0 directive on v-text-field works not as in guide basic example. For instance, it possible to type more than 2 number after delimeter

@dm4t2
Copy link
Owner

dm4t2 commented Nov 7, 2019

@npolyakoff: I can not reproduce the issue you described. It also works fine with Vuetify 1.5.0.

@dm4t2 dm4t2 closed this as completed Nov 7, 2019
@KammerR
Copy link
Author

KammerR commented Nov 7, 2019

Thank you very much @dm4t2 !!! it really worked ...

However, I found another problem (although I think this is a little bug)

When I use a v-slider to update the value, the field does not display the mask and resets to 0.

I think it's because V-text-field treats uses string and v-slider uses a number, but I didn't find a "right" way to fix it.

However, thanks for the help.

I made a update in repo to reproduce it:

https://codesandbox.io/s/github/KammerR/nuxtVcurrencyBuild/tree/master/basicNuxt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants