From f57013c92f07d6dfa6ae29699c5b2fa0b41d7d66 Mon Sep 17 00:00:00 2001 From: Clairton Rodrigo Heinzen Date: Thu, 2 May 2024 19:29:10 -0300 Subject: [PATCH] feat: Add an option to scroll to replied message (#8624) Co-authored-by: Pranav --- .../components/widgets/conversation/bubble/ReplyTo.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/javascript/dashboard/components/widgets/conversation/bubble/ReplyTo.vue b/app/javascript/dashboard/components/widgets/conversation/bubble/ReplyTo.vue index 754c7995466e..fda2a9faab60 100644 --- a/app/javascript/dashboard/components/widgets/conversation/bubble/ReplyTo.vue +++ b/app/javascript/dashboard/components/widgets/conversation/bubble/ReplyTo.vue @@ -7,8 +7,10 @@ 'bg-woot-600 text-woot-50': messageType === MESSAGE_TYPE.OUTGOING, '-mx-2': !parentHasAttachments, }" + @click="scrollToMessage" > import MessagePreview from 'dashboard/components/widgets/conversation/MessagePreview.vue'; import { MESSAGE_TYPE } from 'shared/constants/messages'; +import { BUS_EVENTS } from 'shared/constants/busEvents'; export default { name: 'ReplyTo', @@ -42,5 +45,10 @@ export default { data() { return { MESSAGE_TYPE }; }, + methods: { + scrollToMessage() { + bus.$emit(BUS_EVENTS.SCROLL_TO_MESSAGE, { messageId: this.message.id }); + }, + }, };