eclipsesource / jsonforms-vuetify-renderers

https://jsonforms-vuetify-renderers.netlify.app/
Other
25 stars 26 forks source link

Unable to enter numbers between 0 and 0.1 #113

Open MatTolladay opened 1 month ago

MatTolladay commented 1 month ago

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