Fix rounding in Slider component
Summary: Changelog: [Internal] There was a typo in condition. We need to be comparing step prop and not value. The same condition is implemented in Paper. Reviewed By: JoshuaGross Differential Revision: D23903493 fbshipit-source-id: 37506d0fac63f624332041602489ab1cf378bfcc
This commit is contained in:
Родитель
77c16578bf
Коммит
371430d7eb
|
@ -300,7 +300,7 @@ using namespace facebook::react;
|
|||
|
||||
const auto &props = *std::static_pointer_cast<const SliderProps>(_props);
|
||||
|
||||
if (props.step > 0 && value <= (props.maximumValue - props.minimumValue)) {
|
||||
if (props.step > 0 && props.step <= (props.maximumValue - props.minimumValue)) {
|
||||
value = MAX(
|
||||
props.minimumValue,
|
||||
MIN(props.maximumValue, props.minimumValue + round((value - props.minimumValue) / props.step) * props.step));
|
||||
|
|
Загрузка…
Ссылка в новой задаче