vydimitrov / react-countdown-circle-timer

Lightweight React/React Native countdown timer component with color and progress animation based on SVG

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Display oncomplete Remaining time

kingshax opened this issue · comments

Hello, is there any way to display the time remaining left before the timer restart ?
example: once my 10 seconds are gone, I want to show the remaining time before the timer reset.

Thank you

Hey, the children prop receives also the remaining time.

Hey,

I mean I already managed to start the timer and display it with the remainingTime, it already restart at a certain time based on user input.
I'm having trouble displaying the reset time plus it does not decrement itself (atleast when I'm displaying it) otherwise the reset functionnality works well with the onComplete..

Dunno if I'm clear ><

You will need to pass a key prop to the component and change the value when you want to reset the animation while the timer is running. You can check the recipes there are some examples on how to do it.

I think it will be better with this:
https://user-images.githubusercontent.com/35834812/143027083-f9d88e9e-5e20-4333-bb73-3aa8ea4808a5.mov

I just want instead of the 'finished!', to display the 2 seconds that are being returned, the ones in the 'rest time'.
Really can't figure it out, maybe it doesn't fit with the countdownTimer..?

I am not able to see the video. Can you try to add it here in the bug or create a codesandbox so I can see?

I am closing this bug, let me know if you need any additional help.