-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 🎸 [HCPSDKFIORIUIKIT-2791]SwiftUI: floating value support #834
Conversation
zzchao-1999
commented
Oct 24, 2024
|
||
/// a range of values | ||
var stepRange: ClosedRange<Int> { get } | ||
var stepRange: ClosedRange<Double> { get } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do I control the interval of the stepper?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean the increment/decrement size? If so, you can use the "step" parameter.
var step: Double { get }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may need to enhance the display of number of decimals in the StepperField.
e.g. if you have a range of 0 to 1.0, and stepper value is 0.1, when you increase/decrease, you may see values as "0.6999999999999".
This is due to "Double" is used as the new data type.
One suggestion could be, we can check the stepper value. Then use the same number of decimals, to format the StepperField value
Added a number formatter to ensure the display of number of decimals in the stepperField. |
@zzchao-1999 Check with the reporter if it is needed for rel-4.1 |
* feat: 🎸 [HCPSDKFIORIUIKIT-2791]SwiftUI: floating value support * feat: 🎸 [HCPSDKFIORIUIKIT-2791]Added a number formatter