Clearing a component

I have a solara.use_task-triggered solara.HTML(tag="iframe", ...) component. I want to clear the solara.Column hosting it from it when the user requests its deletion. I can choose to render it or not based on a boolean controlled by the user, but that's not really deleting it right? The iframe holds a resource that is, I think, still present in the DOM. How do I really clear this component? What's the advised practice?
3 Replies
Ahmed Moubtahij
Ahmed MoubtahijOP3mo ago
Or is the idea of Solara that I shouldn't worry about a non-visible iframe resource and that it will clean it up when it deems it appropriate?
MaartenBreddels
MaartenBreddels2mo ago
Yeah, it will clear up if you do not display it, so using a boolean is the right idea! Hope that helps
Ahmed Moubtahij
Ahmed MoubtahijOP2mo ago
Got it, thank you

Did you find this page helpful?