Let say I have a parent and child components.
<button (click)="downloadReport()">Download Report</button>
<app-child-component [reportMode]="reportMode" (onReportModeReady)="onReportModeReady">
</app-child-component>
On the child component I need to hide/display some PrimeNg Component
<p-datatable #dtNormal ngIf="!reportMode"></p-datatable> //normal data table
<p-datatable#dtReport ngIf="reportMode"></p-datatable> //strip out version for report.
The problem I'm having is that the report is being built before even the normal is hidden and the report table is display.
I'd like to build the report only after the the report table is visible so that the child component can fire an event telling to the parent that's everything is ready.
How do I know that Report primeNG datable is ready?
Thanks