ZestfulNation / vue-number-input-spinner

A customizable number input spinner component for Vuejs with character validation and min/max values
https://zestfulnation.github.io/vue-number-input-spinner/
41 stars 21 forks source link

Text input is ignored #5

Closed lsapan closed 6 years ago

lsapan commented 6 years ago

First off, nice little component! I just integrated it into my app but I noticed that manually typing a number into it doesn't actually update numericValue. It's strange too because it seems to work on your demo page.

I tried with and without custom props, no dice. That said, I took a look at the code and it doesn't actually appear to have the relevant setter, so I'm not sure how it worked in the first place! 😅 It's possible I'm missing something, but since you're using v-bind:value instead of v-model, and the @keypress=validateInput doesn't ever actually modify numericValue, isn't a line like this necessary?

@input="numericValue = parseInt($event.target.value)"

I tried adding it locally and it works great. I'm using Vue 2.5 instead of 2.3, so maybe something has changed in the way v-bind:value works?

krystalcampioni commented 6 years ago

@lsapan just merged the PR that was open related to this, hope it fixes your problem! Sorry for taking so long to answer, and thanks for using the package 😅