popover icon indicating copy to clipboard operation
popover copied to clipboard

How can we know for popup open/close in popup's inner component

Open sohebcakewalk opened this issue 6 years ago • 4 comments

Hi @willshowell @pgkehle @aitboudad @rsmcintu,

How can we track open/close event of sat-popover in component which is shown inside of sat-popover.

https://stackblitz.com/edit/angular-aqhcaj

Is there any way to dynamically create sat-popover and show.

Basically i have multiple instance of the sat-popover which is shown on keypress event of textfield.

Please see the below snap.

image

Now from all 1-5 (textfield without border) will show Field Type sat-popover.

I have created another component with four drop-downs which i show inside Field Type sat-popover.

Issue which i am facing is, for all these 5 row, i am getting same sat-popover.

I have to trigger some method inside my component (with four dropdowns inside sat-popover) when sat-popover is open or closed.

Is there anyway i can create single instance of the sat-popover, and use in my component?

Please help.

sohebcakewalk avatar Jan 10 '19 14:01 sohebcakewalk

If I got it right, it looks like something that can be done out-of-the-box. Can you provide more details about the template code where you're building your table (the anchors container) or, maybe, a minimum reproduction?

julianobrasil avatar Jan 10 '19 14:01 julianobrasil

How can we track open/close event of sat-popover in component which is shown inside of sat-popover

You can inject the SatPopover into your child component. Check out this stackblitz and see if that helps.

https://stackblitz.com/edit/angular-2ya97m

Otherwise I don't have a very clear idea of what you're trying to do. Like @julianobrasil said, could you create a small reproduction to illustrate what the issue is?

willshowell avatar Jan 10 '19 15:01 willshowell

@willshowell @julianobrasil - How can we track open or close event inside child-component of SatPopover.

But my current issue is every time SatPopover opened below the first textbox. Like if i want to open 5th SatPopover, it is showing below the 1st SatPopover.

Another issue i have to rest child-components fields when popup is opened.

I will create reproduction.

I appreciate your help.

sohebcakewalk avatar Jan 10 '19 16:01 sohebcakewalk

@sohebcakewalk while you're working on that, maybe this will be helpful:

https://stackblitz.com/edit/angular-nbhbg7

willshowell avatar Jan 10 '19 16:01 willshowell