feat: Add an option to scroll to replied message (#8624)
Co-authored-by: Pranav <pranav@chatwoot.com>
This commit is contained in:
committed by
GitHub
parent
cd14788e67
commit
f57013c92f
@@ -7,8 +7,10 @@
|
|||||||
'bg-woot-600 text-woot-50': messageType === MESSAGE_TYPE.OUTGOING,
|
'bg-woot-600 text-woot-50': messageType === MESSAGE_TYPE.OUTGOING,
|
||||||
'-mx-2': !parentHasAttachments,
|
'-mx-2': !parentHasAttachments,
|
||||||
}"
|
}"
|
||||||
|
@click="scrollToMessage"
|
||||||
>
|
>
|
||||||
<message-preview
|
<message-preview
|
||||||
|
class="cursor-pointer"
|
||||||
:message="message"
|
:message="message"
|
||||||
:show-message-type="false"
|
:show-message-type="false"
|
||||||
:default-empty-message="$t('CONVERSATION.REPLY_MESSAGE_NOT_FOUND')"
|
:default-empty-message="$t('CONVERSATION.REPLY_MESSAGE_NOT_FOUND')"
|
||||||
@@ -19,6 +21,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import MessagePreview from 'dashboard/components/widgets/conversation/MessagePreview.vue';
|
import MessagePreview from 'dashboard/components/widgets/conversation/MessagePreview.vue';
|
||||||
import { MESSAGE_TYPE } from 'shared/constants/messages';
|
import { MESSAGE_TYPE } from 'shared/constants/messages';
|
||||||
|
import { BUS_EVENTS } from 'shared/constants/busEvents';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ReplyTo',
|
name: 'ReplyTo',
|
||||||
@@ -42,5 +45,10 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return { MESSAGE_TYPE };
|
return { MESSAGE_TYPE };
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
scrollToMessage() {
|
||||||
|
bus.$emit(BUS_EVENTS.SCROLL_TO_MESSAGE, { messageId: this.message.id });
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user