How to update componentProps and have overlay components rerender?

Hi

Many ionic components (modal, loading, popover etc) are based on the overlay. According to the doc, one way to pass in data is via the ComponentProps property. This only works for the first time, but if I update ComponentProps, the overlay component will not update and there is no way for me to force update.

Take popover for example, once present method has been called, it seems the HTML element has been created with the initial value of ComponentProps. My question is if I update ComponentProps, how do I get popover to reflect my latest value in ComponentProps? https://github.com/ionic-team/ionic/blob/5f2001c43c0846ec8973cbb8eb5662976ba7e31a/core/src/components/popover/popover.tsx#L138

Btw, I am using Ionic Angular, I only see ngOnInit lifecycle event called in popover component, I don’t see ngOnChanges event fired at all.

Thanks!

I’ve encountered this as well. It is really counterintuitive that the overlay components do not fire ngOnChanges on inputs that are supplied via ComponentProps.
Shouldn’t Ionic call change detector in the background when it creates the component?

FYI, you can pass Observables through componentProps to work around this.