react-native-slider icon indicating copy to clipboard operation
react-native-slider copied to clipboard

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

Open opetroulas opened this issue 6 years ago • 6 comments

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 } />

opetroulas avatar Jun 11 '20 20:06 opetroulas

I'm having the same issue

dsaltz432 avatar Jun 15 '20 18:06 dsaltz432

I'm having the same issue

+1

rubinjohny avatar Jun 19 '20 09:06 rubinjohny

I have the same issue +1

Bhavdip avatar Sep 07 '20 14:09 Bhavdip

+1

bharatgupta99 avatar Feb 11 '21 07:02 bharatgupta99

Any news on this?

DavitVosk avatar Sep 20 '21 10:09 DavitVosk

@DavitVosk As you can see I've created a Project for this library, so every user can track the progress of every issue. As for this one: yes, I got it planned but I need to figure out the API of the solution first, then I'll start a development of that.

BartoszKlonowski avatar Sep 20 '21 11:09 BartoszKlonowski