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

How to control behavior of the thumb on click event #436

Open
atesarova opened this issue Apr 23, 2024 · 0 comments
Open

How to control behavior of the thumb on click event #436

atesarova opened this issue Apr 23, 2024 · 0 comments

Comments

@atesarova
Copy link

I need to set a slider value after click on the track. It works SOMETIMES as you can see from the video (thumb should be in consistence with gradient):

Screen.Recording.2024-04-23.at.16.02.13.mov

Config:


                                       <Slider
						animateTransitions
						maximumTrackTintColor="transparent"
						minimumValue={0}
						maximumValue={100}
						onSlidingComplete={onSlidingComplete}
						onValueChange={onValueChange}
						trackRightPadding={4}
						trackStyle={sliderStyles.track}
						thumbStyle={sliderStyles.thumb}
						minimumTrackTintColor="transparent"
						value={units}
					/>

Desired behavior:

Control the value, after releasing the thumb I need to snap to the correct value on the track.

Current Solution

I am controlling the value using value argument. I know that it should not be a controlled value from documentation. However I need to fix this bug.

Note: it works great with swiping, clicking is the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant