MudBlazor/MudBlazor
MudNumericField: Floating-point precision issues when using double with decimal Step
Aberta
#6.762 aberto em 27 de abr. de 2023
buggood first issue
Métricas do repositório
- Stars
- (10.394 estrelas)
- Métricas de merge de PR
- (Mesclagem média 6d 6h) (108 fundiu PRs em 30d)
Description
Bug type
Component
Component name
MudNumericField
What happened?
When the binded value is a double, and the Step value is a decimal number, the step does not step up properly.
<MudNumericField @bind-Value="doubleValue" Label="Enter a double" Variant="Variant.Outlined" Step="0.05" />

Expected behavior
If I set the step to '0.05', it should increment by that, not some long form value.
Reproduction link
https://try.mudblazor.com/snippet/muwxYycBVQUfdSvT
Reproduction steps
1.User keyboard or press the up/down arrows and watch it increment/decrement inproperly. 2. 3. ...
Relevant log output
No response
Version (bug)
6.2.2
Version (working)
No response
What browsers are you seeing the problem on?
Firefox, Chrome
On what operating system are you experiencing the issue?
Windows
Pull Request
- I would like to do a Pull Request
Code of Conduct
- I agree to follow this project's Code of Conduct