AAE-34641 Fix form loading when tab is changed, update logic in ngOnChanges

This commit is contained in:
Tomasz Nastaly 2025-05-08 13:49:47 +02:00
parent 196752d6f2
commit c2a152a974
No known key found for this signature in database
GPG Key ID: 173905A29EEF5CFD
2 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
<div
*ngIf="viewerType === 'media' || viewerType === 'pdf' || viewerType === 'image' ? isLoading || !isContentReady : isLoading"
*ngIf="viewerType === 'media' || viewerType === 'pdf' || viewerType === 'image' ? (isLoading || !isContentReady) : isLoading"
class="adf-viewer-render-main-loader"
>
<div class="adf-viewer-render-layout-content adf-viewer__fullscreen-container">
@ -15,7 +15,7 @@
</div>
<div
*ngIf="viewerType === 'media' || viewerType === 'pdf' || viewerType === 'image' ? !isLoading && isContentReady : !isLoading"
*ngIf="viewerType === 'media' || viewerType === 'pdf' || viewerType === 'image' ? (!isLoading && isContentReady) : !isLoading"
class="adf-viewer-render-main"
>
<div class="adf-viewer-render-layout-content adf-viewer__fullscreen-container">

View File

@ -185,7 +185,7 @@ export class ViewerRenderComponent implements OnChanges, OnInit {
}
ngOnChanges() {
this.isContentReady = false;
this.isContentReady = !(this.viewerType === 'media' || this.viewerType === 'pdf' || this.viewerType === 'image');
this.isLoading = !this.blobFile && !this.urlFile;
if (this.blobFile) {