diff --git a/apps/red-ui/src/app/modules/file-preview/components/pdf-viewer/pdf-viewer.component.ts b/apps/red-ui/src/app/modules/file-preview/components/pdf-viewer/pdf-viewer.component.ts index 58015f867..d0f5c8d5f 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/pdf-viewer/pdf-viewer.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/pdf-viewer/pdf-viewer.component.ts @@ -229,6 +229,7 @@ export class PdfViewerComponent extends AutoUnsubscribe implements OnInit, OnCha this.annotationManager.addEventListener('annotationSelected', async (annotations: Annotation[], action) => { const nextAnnotations = this.multiSelectService.isEnabled ? this.annotationManager.getSelectedAnnotations() : annotations; this.annotationSelected.emit(nextAnnotations.map(ann => ann.Id)); + this.annotationSelected.emit(action === 'selected' ? nextAnnotations.map(ann => ann.Id) : []); if (action === 'deselected') { return this._toggleRectangleAnnotationAction(true); }