Skip to content

Slider doesn't reach max value when not divisible by step #191

@opetroulas

Description

@opetroulas

Environment

System: OS: macOS Mojave 10.14.6 CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz Memory: 27.24 MB / 32.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 12.14.1 - ~/.nvm/versions/node/v12.14.1/bin/node Yarn: 1.16.0 - /usr/local/bin/yarn npm: 6.13.4 - ~/.nvm/versions/node/v12.14.1/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1 Android SDK: API Levels: 23, 24, 25, 26, 27, 28 Build Tools: 23.0.1, 23.0.3, 24.0.1, 25.0.1, 25.0.2, 25.0.3, 26.0.1, 26.0.3, 27.0.3, 28.0.3 System Images: android-26 | Google APIs Intel x86 Atom_64, android-27 | Google APIs Intel x86 Atom IDEs: Android Studio: 3.1 AI-173.4697961 Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild npmPackages: react: 16.9.0 => 16.9.0 react-native: 0.61.5 => 0.61.5

Description

When the max value is not divisible by the step, the slider stops at the last step before max and can't reach the max value. Below is an example of the props being passed as well as values that trigger this case.

Reproducible Demo

<Slider value={ 10000 } step={ 10000 } minimumValue={ 10000 } maximumValue={ 104200 } />

Metadata

Metadata

Labels

bug reportSomething isn't workingplatform: iOSIssue related to iOS platform

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions