SupremeTechnopriest / react-idle-timer

User activity timer component
https://idletimer.dev
MIT License
1.15k stars 143 forks source link

Prevent timeout countdown reset when modal appears and when there is user activity #359

Open tempoeric opened 1 year ago

tempoeric commented 1 year ago

What happened?

when there is user activity when modal appears the countdown should not reset to 10 and continue the countdown https://codesandbox.io/s/confirm-prompt-forked-k7jn5x?file=/src/App.tsx:0-1100

Reproduction Steps

1. Wait for idle modal
2. hover on the countdown
3. when there is user activity the countdown reset to 10
...

Relevant log output

No response

Screenshots or Additional Context

No response

Module Version

5.7.2

What browsers are you seeing the problem on? Select all that apply.

No response

What devices are you seeing the problem on?

No response

Verification

CMooney-01 commented 1 year ago

This might be what you're looking for: https://idletimer.dev/docs/api/props#stoponidle