From 6658c28c856236a7e32648335b628cbda65d91d9 Mon Sep 17 00:00:00 2001 From: SauceyRed Date: Thu, 29 May 2025 04:09:44 +0200 Subject: [PATCH] feat: add utility to scroll to bottom of element --- utils/scrollToBottom.ts | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 utils/scrollToBottom.ts diff --git a/utils/scrollToBottom.ts b/utils/scrollToBottom.ts new file mode 100644 index 0000000..aca99b4 --- /dev/null +++ b/utils/scrollToBottom.ts @@ -0,0 +1,6 @@ +export default (element: Ref) => { + if (element.value) { + element.value.scrollTo({ top: element.value.scrollHeight }); + return; + } +}