Skip to content

Commit d2d0d00

Browse files
committed
(props) add newMessage to allow web components
1 parent 0c69608 commit d2d0d00

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/ChatWindow/ChatWindow.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ export default {
7575
},
7676
showFiles: { type: Boolean, default: true },
7777
showEmojis: { type: Boolean, default: true },
78-
showReactionEmojis: { type: Boolean, default: true }
78+
showReactionEmojis: { type: Boolean, default: true },
79+
newMessage: { type: Object, default: null }
7980
},
8081
8182
data() {
@@ -104,6 +105,10 @@ export default {
104105
if (!partcipantsValid(user))
105106
throw 'Participants object is not valid! Must contain _id[String, Number] and username[String]'
106107
})
108+
},
109+
110+
newMessage(val) {
111+
this.$set(this.messages, val.index, val.message)
107112
}
108113
},
109114

0 commit comments

Comments
 (0)