-
Notifications
You must be signed in to change notification settings - Fork 54
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
progress bar percentage not recalculating on maxValue change #104
Comments
Experienced the same thing. It works correctly in version 4.3.0. |
I am having the same issue!! Even on 4.3.0 |
Fixed: Set the maxValue to 1 and calculate the current value as percentage. It works perfectly and means you don't need to change the maxValue at all! |
I passed the maxValue as a dependency so that the animatedCircleProps are reconfigured whenever the maxValue changes i.e. when using a state value. This has fixed the issue on my local version. |
This may work for some scenarios but what about wanting to show the actual value? I’m guessing you could only display it, at best, as a percentage? |
not working |
Can you provide more details on what's going wrong? And your code implementation? |
I added the key property and it worked. Here's a example: value={isRestOn ? restMin * 60 - (minutes * 60 + seconds) : focusMin * 60 - (minutes * 60 + seconds)} with the key property, if restMin or focusMin change, the component will update |
if we will dynamically change maxValue, for example using this value as a state, the progress bar percentage is not recalculated or recalculated wrongly.
The text was updated successfully, but these errors were encountered: