Skip to content

Commit

Permalink
FIO-8004 Fixed loader incorrectly showing in embed reports (#1059)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonSoftensity authored Mar 19, 2024
1 parent 8229917 commit 4eee5a6
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ export class FormioReportComponent extends FormioComponent implements OnInit, On
@Output() fetchDataError = new EventEmitter<any>();
@ViewChild('report', { static: true }) declare formioElement?: ElementRef<any>;

public isLoading: boolean;

setFormFromSrc() {
this.service.loadSubmission({ params: { live: 1 } }).subscribe(
(report: FormioReport) => {
this.report = report;
if (report && report.data) {
this.ngZone.runOutsideAngular(() => {
this.setForm({ components: [], report });
this.isLoading = false;
});
}
},
Expand All @@ -41,6 +44,7 @@ export class FormioReportComponent extends FormioComponent implements OnInit, On
if (changes.report && changes.report.currentValue) {
this.ngZone.runOutsideAngular(() => {
this.setForm({ report: changes.report.currentValue, components: [] });
this.isLoading = false;
});
}
}
Expand Down

0 comments on commit 4eee5a6

Please sign in to comment.