[TIMOB-25897] iOS: Ti.UI.iOS.Stepper handles "value" boundaries incorrect
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-05-15T23:59:27.000+0000 |
Affected Version/s | Release 6.3.0, Release 7.1.0 |
Fix Version/s | Release 7.3.0 |
Components | iOS |
Labels | ios, stepper |
Reporter | Hans Knöchel |
Assignee | Vijay Singh |
Created | 2018-03-23T12:41:07.000+0000 |
Updated | 2018-05-15T23:59:30.000+0000 |
Description
We handle allowed values for our Stepper UI element with:
if (newValue < [[self stepper] maximumValue] && newValue > [[self stepper] minimumValue]) {
[[self stepper] setValue:newValue];
} else {
NSNumber *currentValue = [NSNumber numberWithDouble:[[self stepper] value]];
[self.proxy replaceValue:currentValue forKey:@"value" notification:NO];
NSLog(@"[WARN] The value passed in must be smaller than the maximum and bigger than the minimum stepper values");
}
Which is wrong. It should be newValue <= maximum && newValue >= minimum.
PR - https://github.com/appcelerator/titanium_mobile/pull/10046 Test Case -