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

Unable to enter numbers between 0 and 0.1 #113

Open
MatTolladay opened this issue May 30, 2024 · 0 comments
Open

Unable to enter numbers between 0 and 0.1 #113

MatTolladay opened this issue May 30, 2024 · 0 comments

Comments

@MatTolladay
Copy link

Tested here : https://jsonforms-vuetify-renderers.netlify.app/#/example/control

Try to enter 0.01 in the number field and the decimal point will be removed as soon as the leading zero is pressed

In NumberControlRenderer.vue the onInputChange callback displays the value using (line 87)
const numberAsString = inputStringIsInExponentForm ? result.toExponential() : result.toPrecision();
The toPrecision() call prevents the user entering values between 0 and 0.1.

The toPrecision() call needs to occurs after the user has finished editing

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