[V2 ] Messages auto bottom scroll when open message page

Hi all,

I am currently working on a chat module made with Framework7 and firebase. I can create and display messages in my page, but when I open it, it always display the first message created and not the last one. So the user needs to scroll down to the bottom of the page…

How can I specify to display the bottom of the messages on page open?

I tried to add the following command in my created() method:
this.$$(’.messages-content’).scrollTop(10000, 400);

but I am not sure if the create() method is the right place for this command.

Any ideas?

Best regards,
Gauthier

Check out http://framework7.io/docs/messages.html#messages-parameters for ‘scrollMessages’ parameter, “Enable/disable messages autoscrolling when adding new message”

var messages = app.messages.create({
scrollMessages: ‘true’
}
})

friend can you explain how are you doing the chat is that I’m trying to do one with firebase but I do not know how to do it I have no ideas