[Vuejs]-Scroll to bottom in Ionic Vue

0👍

Take a look at "ion-content" component, https://ionicframework.com/docs/api/content

It has many methods and events for scrolling.

0👍

You only need to call the method .scrollToBottom() on the <ion-content> element.
You can use the following approach, refering the ion-content with a ref and calling the method scrollToBottom bellow:

<template>
<ion-content ref="content">

</ion-content>
</template>

export default defineComponent({
  methods: {
    scrollToBottom(){
      this.$refs['content'].scrollToBottom()
    }
  },
});
</script>

Leave a comment