-
Notifications
You must be signed in to change notification settings - Fork 119
Value not updating when changing amount from another input #8
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Hi @emilioeduardob, I fixed the component issue not reflecting change from other input element with same However beware input value from other source could result in |
Hey @kevinongko, I also tried using watch: {
value: function(newVal) {
this.formatValue();
}
}, |
i think there is no need to something like that watch: {
/**
* Watch for value change from other input.
* @param {Number} val
* @param {Number} oldVal
*/
numberValue (val, oldVal) {
if (this.amountValue !== val && this.amountValue === oldVal) {
this.processValue(this.formatToNumber(this.value))
this.formatValue(this.value)
}
}
}, I wold like to discuss that before using the component |
Hi @emilioeduardob , using IMO the value should not be formatted to currency when editing the element, doing so could result in weird behavior when inputting decimals. |
Agree @kevinongko. Editing the element should be without format. |
Hi @eduarguzher, I tried your solution, however there are weird behaviors when inputting @emilioeduardob I also had a hard time figuring how to track other element other than the component itself, the best I can do for now is to show the changes even though it's not formatted. any PR is welcome :D |
thanks for the update @kevinongko , I'll give it a shot and see if I can send a PR |
Hi!
If I have two inputs using the same property, the one with
vue-numeric
is not updated.For example
The value entered in the regular
input
tag is only updated in the html but not on the vue-numeric. Checking with dev tools, I see thatamount
is 0 andvalue
is changing inside theVueNumeric
componentAny Ideas?
The text was updated successfully, but these errors were encountered: