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:
Samuel Susla 2020-09-24 09:43:52 -07:00 коммит произвёл Facebook GitHub Bot
Родитель 77c16578bf
Коммит 371430d7eb
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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));