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

Changing the precision not working correctly #99

Open
diogosantosgoncalves opened this issue Jan 6, 2025 · 0 comments
Open

Changing the precision not working correctly #99

diogosantosgoncalves opened this issue Jan 6, 2025 · 0 comments

Comments

@diogosantosgoncalves
Copy link

I'm having the following issue when changing the precision of a number at runtime. Consider the following v-model value: 2.22, When precision is at 2, it shows the correct value (2.22), However, when I change the precision to 3, the v-model value turns to 0.222. I've tested it with v-model.number or v-model.lazy, both presenting the same issue.

other examples with value: 2.22:
starting values
precision: 2
value: 2.22

chaging precision to 3:
precision: 2
value: 0.222
expected value: 2.220

changing back precision to 2:
precision: 2
value: 2.22
expected value: 2.22

chaging precision to 4:
precision: 4
value: 0.0222
expected value: 2.2200

this my config

const config = {
decimal: ',',
thousands: '.',
prefix: '',
suffix: '',
precision: 2,
max: 999999999999,
masked: false,
modelModifiers: {
number: true,
}
}

v-money3: 3.22.2

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

1 participant