Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70435

How to update componentProps and have overlay components rerender?

$
0
0

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!

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 70435

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>