How can i sync scroll event of two vue component i a non-parent-child relation
Scrolling here ...
BaseLayout.vue
<script setup>
...
function logScrolling(event) {
console.log("Scrolling to " + event.detail.currentY);
// rightIonContent.value.$el.scrollToPoint(X, Y, 500); // this is not working
}
...
</script>
<template>
...
<ion-content :scroll-events="true" @ionScroll="logScrolling($event)" >
<slot />
</ion-content>
...
</template>
should be synced with:
AppMenuRight.vue
<script setup>
function ScrollingToPoint(X, Y) {
rightIonContent.value.$el.scrollToPoint(X, Y, 500);
}
</script>
<template>
...
<ion-content :scroll-events="true" ref="rightIonContent">
...
</ion-content>
...
</template>