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

Range slider UI isn't updated on resetting initialLowValue and initialHighValue #82

Closed
SaadAli-rolustech opened this issue Feb 15, 2021 · 7 comments

Comments

@SaadAli-rolustech
Copy link

I am setting initialLowValue and initialHighValue value via state. If I reset the state to initial values, the slider re-renders but does not reflect the changes physically. The initialLowValue and initialHighValue values are reset but the slider UI doesn't change. How can I achieve this?

@githuboftigran
Copy link
Owner

@SaadAli-rolustech , there are no initialLowValue and initialHighValue props anymore. Please read the documentation.

@SaadAli-rolustech
Copy link
Author

SaadAli-rolustech commented Feb 17, 2021

@githuboftigran I just went through the documentation. initialHighValue and initialLowValue have been replaced with high and low props respectively. I have assigned them values too but UI doesn't reflect any changes. Please guide me.

@githuboftigran
Copy link
Owner

@SaadAli-rolustech , they are not replaced, those props are removed. low and high values are not initial values. They are the actual values. If you set them to a constant, your slider will have pinned thumbs.
These props work just like prop value in TextInput.

@githuboftigran
Copy link
Owner

@SaadAli-rolustech
Copy link
Author

@githuboftigran then which props are the initial values?

@githuboftigran
Copy link
Owner

There are no initial values. You should have state variables for low and high and then update them in onValueChange listener.

@mrshahzeb7
Copy link

underStood ! thanks

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

3 participants