feat: add utility to scroll to bottom of element

This commit is contained in:
SauceyRed 2025-05-29 04:09:44 +02:00
parent f44d67212b
commit 6658c28c85
Signed by: sauceyred
GPG key ID: 270B096EF6E9A462

6
utils/scrollToBottom.ts Normal file
View file

@ -0,0 +1,6 @@
export default (element: Ref<HTMLElement | undefined, HTMLElement | undefined>) => {
if (element.value) {
element.value.scrollTo({ top: element.value.scrollHeight });
return;
}
}