Working on a chat feature and looking for a way to automatically scroll to the end of the conversation when new messages are added.
The current solution involving the updated()
function works well, but there's a complication with a vue-timepicker
component that updates every second, preventing scrolling.
Any suggestions on how to adjust the implementation so that the $nextTick()
only triggers after changes in the message array?
updated() {
this.$nextTick(() => this.scrollToBottom());
},