[Enhancement] Enter to send message, add click on bubble instead of icon (#202)

This commit is contained in:
Pranav Raj S 2019-11-09 17:12:31 +05:30 committed by GitHub
parent 63ce5607e9
commit 7e3409c3e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 84 additions and 94 deletions

View file

@ -3,9 +3,7 @@
<div class="header-wrap">
<ChatHeaderExpanded />
</div>
<div class="conversation-wrap">
<ConversationWrap :messages="getConversation" />
</div>
<ConversationWrap :messages="getConversation" />
<div class="footer-wrap">
<ChatFooter :on-send-message="handleSendMessage" />
</div>
@ -15,7 +13,6 @@
<script>
import { mapActions, mapGetters } from 'vuex';
// import { DEFAULT_CONVERSATION } from 'widget/store/modules/conversation';
import ChatFooter from 'widget/components/ChatFooter.vue';
import ChatHeaderExpanded from 'widget/components/ChatHeaderExpanded.vue';
import ConversationWrap from 'widget/components/ConversationWrap.vue';
@ -34,20 +31,10 @@ export default {
content,
});
},
scrollToBottom() {
const container = this.$el.querySelector('.conversation-wrap');
container.scrollTop = container.scrollHeight;
},
},
computed: {
...mapGetters('conversation', ['getConversation']),
},
mounted() {
this.scrollToBottom();
},
updated() {
this.scrollToBottom();
},
};
</script>