From 3d08919798ee04ad9a09377df914294c08dcb02e Mon Sep 17 00:00:00 2001 From: josc146 Date: Thu, 2 Nov 2023 21:41:33 +0800 Subject: [PATCH] force scroll to bottom after submission --- src/components/ConversationCard/index.jsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/ConversationCard/index.jsx b/src/components/ConversationCard/index.jsx index ea0c1ed..e591491 100644 --- a/src/components/ConversationCard/index.jsx +++ b/src/components/ConversationCard/index.jsx @@ -528,6 +528,10 @@ function ConversationCard(props) { } catch (e) { updateAnswer(e, false, 'error') } + bodyRef.current.scrollTo({ + top: bodyRef.current.scrollHeight, + behavior: 'instant', + }) }} />