You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ckrac
changed the title
[Bug]:
[Bug]: NumberField does not reflect the correct value in the UI when value is a negative floating number and step is a floating number
Aug 3, 2023
While JS does not have floating point numbers and has issues with precision, but usually not to this low of a decimal place. We should check to see how we're rounding these numbers, because the output seems like it's using the ceil() function.
Code of conduct
Impacted component(s)
sp-number-field
Expected behavior
The value passed to the value property should be reflected in the UI without any rounding.
Actual behavior
When the
value
is a negative floating number (eg. -2.4) and step is set to a float number, the value in the UI is rounded.Screenshots
What browsers are you seeing the problem in?
all browsers
How can we reproduce this issue?
step
property value to0.001
under storybook controlsvalue
property value to-2.4
or any negative floating numbervalue
enteredSample code that illustrates the problem
No response
Logs taken while reproducing problem
No response
The text was updated successfully, but these errors were encountered: