Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thumb does not move discretely with step prop set #390

Closed
CptFabulouso opened this issue Jun 20, 2022 · 12 comments · Fixed by #393
Closed

Thumb does not move discretely with step prop set #390

CptFabulouso opened this issue Jun 20, 2022 · 12 comments · Fixed by #393
Assignees
Labels
bug report Something isn't working in repro Issue has been added to the repro app platform: iOS Issue related to iOS platform

Comments

@CptFabulouso
Copy link

Environment

System:
    OS: macOS 12.4
    CPU: (10) arm64 Apple M1 Max
    Memory: 474.09 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.0.0 - /opt/homebrew/bin/node
    Yarn: 1.22.18 - /opt/homebrew/bin/yarn
    npm: 8.6.0 - /opt/homebrew/bin/npm
    Watchman: 2022.05.16.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.1 AI-211.7628.21.2111.8309675
    Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.11 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2 
    react-native: 0.68.2 => 0.68.2 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Description

Adding step={1} is working in version 4.1.10, but not in 4.2.2 or 4.2.3 (I didn't test other versions), meaning the thumb is not moving (jumping) discretely between 1*N min/max values, but instead moves continuously.

Reproducible Demo

import Slider from '@react-native-community/slider';
import React, { useState } from 'react';

const SliderComponent = () => {
	const [value, setValue] = useState(0);

	return (
		<Slider
			value={value}
			step={1}
			minimumValue={0}
			maximumValue={5}
			onValueChange={setValue}
		/>
	);
};
@CptFabulouso CptFabulouso added the bug report Something isn't working label Jun 20, 2022
@BartoszKlonowski
Copy link
Member

Hello @CptFabulouso, thanks for finding and reporting!
Which platform do you observe this on?

@BartoszKlonowski BartoszKlonowski self-assigned this Jun 20, 2022
@CptFabulouso
Copy link
Author

Hi. I've tested this on iPhone 11 pro max simulator, not any other device.

@BartoszKlonowski
Copy link
Member

@CptFabulouso Sure! So I will test it also for others, thanks again 👍

@BartoszKlonowski BartoszKlonowski added the platform: iOS Issue related to iOS platform label Jun 20, 2022
@BartoszKlonowski BartoszKlonowski added the in repro Issue has been added to the repro app label Jun 21, 2022
@BartoszKlonowski
Copy link
Member

I confirm this issue to be the iOS only.
The tapToSeek seems to be working fine - user cannot tap to other position than defined step.

I will work on this.

@doganoruc
Copy link

Hello, @BartoszKlonowski is there any update for this issue. I couldn't use the step prop for the discrete movement of the slider.

Thanks a lot.

@BartoszKlonowski
Copy link
Member

@doganoruc I plan to deliver the fix in the upcoming week, thank you for you patience!

@doganoruc
Copy link

Thanks a lot, I have an another question for vertical prop. Is there any problem in there too, for iOS? @BartoszKlonowski

@BartoszKlonowski
Copy link
Member

@doganoruc There's an issue already created for vertical Slider: #196, please track the progress there.

@ironbat1
Copy link

BartoszKlonowski
Hi @BartoszKlonowski ,

I hope you are doing well, is there any update on your side,
I really appreciate the work you are doing! Thank you so much.

@BartoszKlonowski
Copy link
Member

BartoszKlonowski commented Jun 27, 2022

@ironbat1 Thanks for asking, I'm still working on it.

I plan to deliver the fix in the upcoming week, thank you for you patience!

You can expect a fix (along with some other fixes in 4.2.4) somewhere this week.


I really appreciate the work you are doing! Thank you so much.

I didn't see you anywhere among Stargazers, though... 🙂

@dhmoon91
Copy link

Hey @BartoszKlonowski Is 4.2.4 supposed to fix this?

I'm still seeing issue;
The thumb is not dragging properly based on step prop value. Tapping on the slider works properly

I can provide more info if you need.

@BartoszKlonowski
Copy link
Member

BartoszKlonowski commented Jul 14, 2022

@dhmoon91 Sure! Give me as many details as you can (including platform).
What would be useful is the repro code sample and maybe some recording.
I'll reopen once we got this confirmed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Something isn't working in repro Issue has been added to the repro app platform: iOS Issue related to iOS platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants