-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Input breaks when using watch options and autoDecimalDigits false #419
Comments
@dm4t2 Possible solution: setOptions function does not pass the hideNegligibleDecimalDigits to the format() function. It's always set to false.
We should pass in the option:
|
Same issue as #400. You can avoid this by checking if the options have actually really changed before calling Maybe you also have an idea why the options watcher has such a weird behavior? |
As far as I can tell it's because of the way this function is defined and the second parameter is always false: setOptions needs to pass it in, see comment above. I made that change in my fork and it works perfect. |
Vue Currency Input version
v3.0.3
Vue version
v3.2.45
What browser are you using?
Chrome
What operating system are you using?
MacOS
Reproduction link
https://codesandbox.io/s/muddy-frost-p7qgv2?file=/src/components/VCurrencyField.vue:1006-1023
Describe your issue
When using watch options and
autoDecimalDigits:false
, the input behaves in a strange way where it breaks after each number press and only accepts the last number. See code sandbox for working example.It seems to only continue working correctly if precision is set to 0.
The text was updated successfully, but these errors were encountered: