Having trouble with the Close button in Angular 4 popup/table
- The Pop Up is not closing after clicking anywhere on the screen.
- I have added backdrop functionality so that the pop-up closes only when the user clicks on the close icon.
- However, the close icon does not work until data loads inside the pop-up/table. I am using ag-grid data within the pop-up/table.
Any suggestions or ideas on how to solve this issue?
Here is a snippet of my template:
reg-list.component.ts
{
headerName: "Regulations",
cellRenderer: this.regulationsClick,
onCellClicked: function(params) {
console.log(params);
const modalRef = that.modalService.show(ControlsListComponent,{class: 'gray modal-lg', keyboard: false, backdrop : 'static'});
modalRef.content.data = params.data;
},
valueGetter: this.regulationsClick,
enableRowGroup: true,
enablePivot: true,
}
regulationsClick(params){
if(params.data && params.data.AppCertificateMembers.length>0){
const Regulations:any=[];
let regulationstring: any;
params.data.AppCertificateMembers.forEach((value,index) =>{
Regulations.push(value.Certificate.name);
params.regulationstring = Regulations.toString();
console.log("assets", params.regulationstring);
});
return `<a href="javascript:void(0)" style="font-size: 12px">${params.regulationstring}</a>`;
}
else{
console.log("checkelse");
return ;
}
}