[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
11 changed files with 84 additions and 94 deletions
@@ -1,5 +1,5 @@
<template>
<section class="conversation">
<section class="conversation-wrap">
<ChatMessage
v-for="message in messages"
:key="message.id"
@@ -19,14 +19,20 @@ export default {
props: {
messages: Object,
},
mounted() {
this.scrollToBottom();
},
updated() {
this.scrollToBottom();
},
methods: {
scrollToBottom() {
const container = this.$el;
container.scrollTop =
container.scrollHeight < this.minScrollHeight
? this.minScrollHeight
: container.scrollHeight;
},
},
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
@import '~widget/assets/scss/variables.scss';
.conversation {
height: 100%;
}
</style>