[SliderIOS] Apply value after minimum/maximumValue in order to ensure it is properly set#835
[SliderIOS] Apply value after minimum/maximumValue in order to ensure it is properly set#835brentvatne wants to merge 1 commit intofacebook:masterfrom brentvatne:fix-slider-value
Conversation
|
While this solution works, I do wonder if it's worth adding a hook on view manager classes that allows us to specify in what order props should be applied, either in JS or Objective-C. eg: instead of having // RCTSliderManager.m
- (NSArray *)applyPropsFirst
{
return @[ @"minimumValue", @"maximumValue" ];
}or... // RCTSliderManager.m
- (NSArray *)propsOrder
{
return @[ @"minimumValue", @"maximumValue", @"value" ];
}This would have been helpful for me on @tadeuzagallo - thoughts? cc @vjeux |
- `value` is clamped between min/max and so order of prop application matters
|
ping @tadeuzagallo - simple change here that we discussed in IRC, would be good to get it into next sync if possible |
|
I've been trying to land this today, but ran into an unexpected merge conflict. Should be sorted shortly. |
… it is properly set Summary: `value` is clamped between min/max and so order of prop application matters - `value` always ended up being set first in my tests, and consequently a value outside of the default range 0-1 would not work. So this applies the value when the min/max are set. [Gist of broken example](https://gist.github.com/brentvatne/fc637b3e21d012966f3a)  ^ the second slider here should have it's cursor in the middle /cc @tadeuzagallo Closes facebook/react-native#835 Github Author: Brent Vatne <brent.vatne@madriska.com> Test Plan: Imported from GitHub, without a `Test Plan:` line.
… it is properly set Summary: `value` is clamped between min/max and so order of prop application matters - `value` always ended up being set first in my tests, and consequently a value outside of the default range 0-1 would not work. So this applies the value when the min/max are set. [Gist of broken example](https://gist.github.com/brentvatne/fc637b3e21d012966f3a)  ^ the second slider here should have it's cursor in the middle /cc @tadeuzagallo Closes facebook/react-native#835 Github Author: Brent Vatne <brent.vatne@madriska.com> Test Plan: Imported from GitHub, without a `Test Plan:` line.
valueis clamped between min/max and so order of prop application matters -valuealways ended up being set first in my tests, and consequently a value outside of the default range 0-1 would not work. So this applies the value when the min/max are set.Gist of broken example
^ the second slider here should have it's cursor in the middle
/cc @tadeuzagallo