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
Currently, snapValueToStep is ignored only when no step is provided, which is unlikely in most cases. Since the default step value is 1, this behavior can lead to unexpected rounding, especially when format options like minimumFractionDigits and maximumFractionDigits are specified. This can result in inconsistent number formatting
Proposed Solutions
To improve flexibility, I propose one of the following:
Add a Prop – Introduce an additional prop to control whether values should snap to the step value.
Disable Snapping When Formatting is Applied – Automatically disable snapValueToStep if minimumFractionDigits or maximumFractionDigits are specified, ensuring the input value maintains its intended precision.
Describe the feature
Currently, snapValueToStep is ignored only when no step is provided, which is unlikely in most cases. Since the default step value is 1, this behavior can lead to unexpected rounding, especially when format options like minimumFractionDigits and maximumFractionDigits are specified. This can result in inconsistent number formatting
Proposed Solutions
To improve flexibility, I propose one of the following:
Code Reference
https://github.com/unovue/radix-vue/blob/33f50be4fd6cb2370fb44b714a3fcde0e020b819/packages/core/src/NumberField/NumberFieldRoot.vue#L147-L157
Would love to hear thoughts on this approach
Additionally, I found a potentially related discussion here: #977
Additional information
The text was updated successfully, but these errors were encountered: