diff options
| author | Ashm Walia <ashmwalia@outlook.com> | 2021-01-29 11:03:55 -0800 |
|---|---|---|
| committer | Ashm Walia <ashmwalia@outlook.com> | 2021-01-29 11:03:55 -0800 |
| commit | b34ae3fa04934616934bd50e9a472e19036ec2fa (patch) | |
| tree | 03350ff375eb49368937befc1fa0afe74b8da1e5 | |
| parent | 0e86cd3c972e54cf700cca65bb2493e84056276c (diff) | |
Fix
| -rw-r--r-- | src/components/comments/CommentsContainer.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/components/comments/CommentsContainer.tsx b/src/components/comments/CommentsContainer.tsx index d2f11b96..a0e94828 100644 --- a/src/components/comments/CommentsContainer.tsx +++ b/src/components/comments/CommentsContainer.tsx @@ -65,8 +65,9 @@ const CommentsContainer: React.FC<CommentsContainerProps> = ({ ); setInitialIndex(index); } else { - setInitialIndex(commentsList.length - 1); - ref.current?.scrollToEnd({animated: true}); + setTimeout(() => { + ref.current?.scrollToEnd({animated: true}); + }, 500); } } } |
