diff --git a/gui/src/components/chat.vue b/gui/src/components/chat.vue index 8abf6eab..0087381e 100644 --- a/gui/src/components/chat.vue +++ b/gui/src/components/chat.vue @@ -2,7 +2,6 @@ // @ts-nocheck // disable typescript check beacuse of error with beacon histogram options - import chat_conversations from "./chat_conversations.vue"; import chat_messages from "./chat_messages.vue"; import chat_new_message from "./chat_new_message.vue"; @@ -14,8 +13,6 @@ setActivePinia(pinia); import { useChatStore } from "../store/chatStore.js"; const chat = useChatStore(pinia); - - import { Chart as ChartJS, CategoryScale, @@ -106,16 +103,18 @@ const beaconHistogramData = computed(() => ({ })); const messagesContainer = ref(null); -watch(() => chat.scrollTrigger, (newVal, oldVal) => { - //console.log("Trigger changed from", oldVal, "to", newVal); // Debugging line - nextTick(() => { - if (messagesContainer.value) { - messagesContainer.value.scrollTop = messagesContainer.value.scrollHeight; - } - }); -}); - - +watch( + () => chat.scrollTrigger, + (newVal, oldVal) => { + //console.log("Trigger changed from", oldVal, "to", newVal); // Debugging line + nextTick(() => { + if (messagesContainer.value) { + messagesContainer.value.scrollTop = + messagesContainer.value.scrollHeight; + } + }); + }, +);