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
We are moving to RAC NumberField component but having issues with how it behaves with float numbers. Native number input keeps decimal places when increment/decrement buttons are pressed while RAC NumberField removes them.
🤔 Expected Behavior?
Incrementing and decrementing should respect the step value. For instance, if the current value is 1.5 and step is set to 1, clicking + button should increase the value by 1, resulting in 2.5 rather than 2.
Edit: Setting step to 1 explicitly in NumberField will actually round the default value.
😯 Current Behavior
The RAC NumberField component removes decimal places from float numbers when the increment or decrement buttons are pressed, resulting in rounded whole numbers.
Provide a general summary of the issue here
We are moving to RAC NumberField component but having issues with how it behaves with float numbers. Native number input keeps decimal places when increment/decrement buttons are pressed while RAC NumberField removes them.
🤔 Expected Behavior?
Incrementing and decrementing should respect the
step
value. For instance, if the current value is 1.5 andstep
is set to 1, clicking+
button should increase the value by 1, resulting in 2.5 rather than 2.Edit: Setting
step
to 1 explicitly in NumberField will actually round the default value.😯 Current Behavior
The RAC NumberField component removes decimal places from float numbers when the increment or decrement buttons are pressed, resulting in rounded whole numbers.
💁 Possible Solution
No response
🔦 Context
No response
🖥️ Steps to Reproduce
Go to https://stackblitz.com/edit/vitejs-vite-8sg8un?file=src%2FApp.tsx
Version
React Aria Components v 1.4.1
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
Mac OS
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
The text was updated successfully, but these errors were encountered: