I call IonContent scrollToTop method and console expections is thrown:
"Uncaught TypeError: content.value.scrollToTop is not a function".
I used ref from vue, but still same error.
However, it does not seem like this is possible in Vue right now: https://forum.vuejs.org/t/set-which-element-is-referenced-if-ref-is-set-from-parent/31480.
<ion-content :scroll-event="true" class="ion-padding-top" ref="myContent">
<!-- Fab button to scrollToTop onClick -->
<ion-fab-button @click="handleFabClick" color="primary">
<ion-icon :icon="arrowUpCircle"></ion-icon>
</ion-fab-button>
methods: {
handleFabClick() {
// Not working properly as error show scrollToTop function is not defined but in IDE,
// but in IDE it is defined as ionic function
(this.$refs.myContent as any).scrollToTop(200);
},
}
I call IonContent scrollToTop method and console expections is thrown:
"Uncaught TypeError: content.value.scrollToTop is not a function".
I used ref from vue, but still same error.
However, it does not seem like this is possible in Vue right now: https://forum.vuejs.org/t/set-which-element-is-referenced-if-ref-is-set-from-parent/31480.