[Bug] Stepper rounds initial value #10032
Comments
I think this might be introduced by #7383 Just so we can get a clear picture of what you are trying to do. Can I ask you to add a small reproduction sample that shows the issue? You mention Android, did you try it on iOS at all? And with a non-Material Stepper? |
@jfversluis I did not check it with iOS and a non-material Stepper. I Will check it tomorrow and apply a test project. |
@jfversluis Sorry, I just had time to create the sample project. I did not test it on iOS, the Android default renderer are also affected. There you go: https://github.com/RonnyBansemer/StepperRoundingIssue |
No worries @RonnyBansemer thanks for taking the time to do this! To verify if it also happens on iOS, I pasted all the bits into a new project. My File > New project came with Forms 4.4 where this bug didn't happen, then upgraded to the latest stable and I suddenly see this on both Android and iOS. Fairly sure it's because of the change I mentioned earlier. Also tested with the latest nightly and still happens. |
Round stepper values so we can pretend they're not FP numbers but obey the decimal logic. Rounding happen at n+4 position, n being the position of the most significant digit of the increment. That gives up to 4 significant digit to the increment. - fixes #5168 (for good) - fixes #10032 - fixes #11169
Description
The Stepper (material renderer) changes the initial value of the value property (2-way-binding).
A bound value, lets say 4.99, with stepper increment 0.1 leads to rounding value to 5.00.
Steps to Reproduce
Expected Behavior
Stepper should in-/decrement the initial value by 0.1 (--> 5.09, 5.19,... ) until min-/max-value is reached.
Actual Behavior
Stepper initial value is rounded after binding from 4.99 to 5.00 (--> 5.10, 5.20, ...).
Basic Information
The text was updated successfully, but these errors were encountered: