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

Time is updated after re-render of the component even if minInterval it's setted to 60 #40

Closed
YagoBiermann opened this issue Sep 12, 2021 · 4 comments · Fixed by #41
Closed
Assignees
Labels

Comments

@YagoBiermann
Copy link

I think that's kind of bug, i'm using simple menu from material-ui and this happen when you click the button and the component get re-rendered. I reproduce this bug on code sandbox, i will put the link below.

timebug

code sandbox link

@alanwei0 alanwei0 added the bug label Sep 13, 2021
@alanwei0 alanwei0 self-assigned this Sep 13, 2021
@alanwei0 alanwei0 removed the bug label Sep 17, 2021
@alanwei0
Copy link
Collaborator

Could you provide me your code snippet about using <TimeAgo>?

@YagoBiermann
Copy link
Author

Of course, i already put it, but here's again: https://codesandbox.io/s/timeago-mininterval-bug-sll79

@alanwei0
Copy link
Collaborator

@YagoBiermann we did some improvement in the latest version(v3.0.4), you could check the code here. But we still need you to do some change in your code to fix this issue. In brief, you have to make the props unchanged.

const timeAgoOpts = { minInterval: 60 }

<TimeAgo opts={timeAgoOpts} datetime={time} />

Please let me know if you have any other question.

@alanwei0 alanwei0 reopened this Sep 22, 2021
@YagoBiermann
Copy link
Author

@alanwei0 now it seems to be working fine, thank you very much for the attention. Have a good day!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants