Angular popover autoclose property - open only 1 popover at a time

698 views Asked by At

I have a list of contacts and for each contact i can add a note. My requirement is- If i open notes popover for 1 contact and then click on 'Add notes' of second contact then only 2nd popover should be open and not both.

I tried to set [autoClose]="'outside'", but then I am not able to apply styles from dropdown menu. enter image description here (I am using tinymce editor)

 <a triggers="manual" #notesBox="ngbPopover" [ngbPopover]="notesEditor" [autoClose]="'outside'" popoverTitle='My Note'(click)="notesBox.open()">

Can anyone suggest the solution please

1

There are 1 answers

2
Chris Tapay On

From version 3.0, the ngbPopover closes on both outside and inside clicks as well as Escape presses. Remove the autoClose input from your example so the popover will use the default behavior (autoClose = true)

Since you're using a manual trigger, make sure to use the proper template references and logic to open/close your modal. Refer to the manual triggers example to check that out.

enter image description here