miblanchard/react-native-slider

Double slider layout bug on reset action

NeverovN opened this issue · 7 comments

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

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

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.

can you share the code please

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

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

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.

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.