+ Start a Discussion
shivram survaseshivram survase 

How to close the parent LWC component from child LWC component popup model on button click.?

I have a lightning Web component like this:
Component A: Parent Component
Component B: Child Component
I'm calling Component B from Component A on button click.
I want to implent either of the below. Any suggestions/help appreciated.
1.  I want to close the Component A automatically when Component B popup model is showed up on button click.
2. Else I want close the Component A automatically when Component B popup model is closed.
VinayVinay (Salesforce Developers) 
HI Shivram,

Check below example.

https://developer.salesforce.com/forums/?id=9060G0000005qnBQAQ

Please mark as Best Answer if above information was helpful.

Thanks,
mukesh guptamukesh gupta
Hi Shivram,

It's not possible, bceause Component B is embedded in Componnent A, if you try to close Component A then ComponentB will automatically close.

if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.

Thanks
Mukesh
Arta mantArta mant
Hello If you're wondering what casino is the best place to spend your time, there's no doubt about it. Immediately I can tell you that you should go to this site tangiers casino vip (https://tangiers.casinologincanada.com/) . Here you can find the best casino for yourself with the ability to make quick money and get fast fun.