aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAshm Walia <ashmwalia@outlook.com>2021-01-29 11:03:55 -0800
committerAshm Walia <ashmwalia@outlook.com>2021-01-29 11:03:55 -0800
commitb34ae3fa04934616934bd50e9a472e19036ec2fa (patch)
tree03350ff375eb49368937befc1fa0afe74b8da1e5 /src
parent0e86cd3c972e54cf700cca65bb2493e84056276c (diff)
Fix
Diffstat (limited to 'src')
-rw-r--r--src/components/comments/CommentsContainer.tsx5
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);
}
}
}