I am trying to display a simple popover with ionic/vue. The popover seems to be triggered correctly and the arrow is showing on iOS devices but the content itself is not being rendered at all.
During some troubleshooting the “SettingsMenu” is rendered properly when displayed on it’s own as but without the use of a popover.
Very grateful for any input as this seems like a very trivial thing to sort out?
what works:
Button
<ion-buttons slot="end">
<slot name="actions-end"></slot>
<ion-button @click="openPopover" slot="end">
<ion-icon slot="icon-only" :icon="ellipsisVerticalSharp">Show Settings</ion-icon>
</ion-button>
</ion-buttons>
Content
import SettingsMenu from '../popovers/settings.vue';
Popover Controller
methods: {
async openPopover(ev) {
const popover = await popoverController
.create({
component: SettingsMenu,
cssClass: 'my-custom-class',
event: ev,
translucent: true
});
return popover.present();
},
}
Settings.vue
<template>
<ion-content class="ion-padding">
Settings Content
</ion-content>
</template>
<script>
import { IonContent } from '@ionic/vue';
import { defineComponent } from 'vue';
export default defineComponent({
name: 'SettingsMenu',
components: { IonContent }
});
</script>