Skip to content

Commit 5318e78

Browse files
committed
should auto scroll when its at the bottom
1 parent 4f125df commit 5318e78

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/ChatInterface.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,10 @@ export default {
406406
async handleResultClick(result: QueryResult) {
407407
await request("expandTableResult", { results: [result] })
408408
await this.$nextTick();
409-
this.$refs.chatMessagesRef!.scrollTop =
410-
this.$refs.chatMessagesRef!.scrollHeight;
409+
if (this.isAtBottom) {
410+
this.$refs.chatMessagesRef!.scrollTop =
411+
this.$refs.chatMessagesRef!.scrollHeight;
412+
}
411413
},
412414
},
413415
directives: {

0 commit comments

Comments
 (0)