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

Double slider layout bug on reset action #396

Open
NeverovN opened this issue Apr 17, 2023 · 7 comments
Open

Double slider layout bug on reset action #396

NeverovN opened this issue Apr 17, 2023 · 7 comments

Comments

@NeverovN
Copy link

NeverovN commented Apr 17, 2023

On firing reset action which assigns new value to the slider boundaries, thumbs do move with animation to desired places. However, the progress bar of the slider remains at the past state until you change the state of anything on the screen. This is specific only for 2-thumbs slider.

Seems that there is some ref logic dependency, which does not reflect the correct state after replacing the original value.

screen-20230417-201119.2.mp4
@NeverovN NeverovN changed the title Double slider layout is not changed on reset action Double slider layout bug on reset action Apr 17, 2023
@Chronostyle
Copy link

duplicate of #338, there's solution right there but seems not good enough

@NeverovN
Copy link
Author

duplicate of #338, there's solution right there but seems not good enough

This was a solution I thought of. However, it works inconsistently, as it is based on time. If you re-render screen to fast at the moment when slider thum os still finishes animation, this will lead to indicator stop at the point where the thumb is, not a the point is should be.

@matthewadel
Copy link

can you share the code please

@stevenharderjr
Copy link

Extra render isn't much of a solution. It's still visibly janky.

@sfreeman28
Copy link
Contributor

Checkout by merge request which fixes this issue. I also included a patch file for those that want to try the fix out.

@Adamchello
Copy link
Contributor

Hey @miblanchard, any chance the pull request above could be merged into main soon? It addresses a key issue that I've been facing, and I think it would be beneficial for others as well.

@BiosBoy
Copy link

BiosBoy commented Sep 28, 2023

Hey, have been facing the same issue for a while. Any ETA when this PR will be merged to NPM https://github.com/miblanchard/react-native-slider/pull/414/files ? It is really something I'm looking after. Thanks for your effort and contribution guys.

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

7 participants