Hi forum, I need a bit of help with the popover in Ionic v6 rc3 and Stencil 2.10.
The problem is that when the popover closes, it flickers. It does when I click in the inside options or backdrop.
Here’s the demo:
The same exact code works perfectly (with no flickering) in Ionic 5.9.1.
So… It may be a bug? Or did I miss something in the changes report?
Thank you in advance, this is my code:
(I have no CSS)
Calling popover
<ion-button onClick={ev => this.presentPopover(ev)}>
<ion-icon name="ellipsis-horizontal" />
</ion-button>
Creating popover
async presentPopover(ev: any) {
const popover = await popoverController.create({
component: 'popover-modal-configure-mold',
cssClass: 'popover-modal-configure-mold',
event: ev,
translucent: true,
});
await popover.present();
popover.onDidDismiss().then((data) => {
if (data.data !== undefined) {
if (data.data === 'copy') {
this.copyFromBuiltMold();
} else {
this.saveMold();
}
}
});
}
And rendering popover
@Element() popover: HTMLElement;
render() {
return [
<ion-list>
<ion-item onClick={() => this.popover.closest('ion-popover').dismiss('copy')}>
Copiar de otro molde
<ion-icon name="copy" slot="end" />
</ion-item>
<ion-item lines="none" onClick={() => this.popover.closest('ion-popover').dismiss('save')}>
Guardar
<ion-icon name="save" slot="end" />
</ion-item>
</ion-list>,
];
}
2 posts - 2 participants