mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-19 08:46:11 +01:00
📜 refactor: Enhance Auto Scroll Speed and UseEffect Cleanup (#1591)
This commit is contained in:
parent
a7c54573c4
commit
83292a47a7
3 changed files with 10 additions and 4 deletions
|
|
@ -63,6 +63,12 @@ export default function useMessageScrolling(messagesTree?: TMessage[] | null) {
|
|||
if (isSubmitting && scrollToBottom && !abortScroll) {
|
||||
scrollToBottom();
|
||||
}
|
||||
|
||||
return () => {
|
||||
if (abortScroll) {
|
||||
scrollToBottom && scrollToBottom?.cancel();
|
||||
}
|
||||
};
|
||||
}, [isSubmitting, messagesTree, scrollToBottom, abortScroll]);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue