From 2d2ba49242bd3533536d0d75d4a2ef46054a6f3a Mon Sep 17 00:00:00 2001 From: George Date: Thu, 30 Mar 2023 17:31:32 +0300 Subject: [PATCH] RED-6412, fix document annotation select being delayed. --- .../components/file-workload/file-workload.component.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts b/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts index 48d42db25..682952d93 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts @@ -12,12 +12,11 @@ import { IconButtonTypes, INestedFilter, IqserEventTarget, - log, shareDistinctLast, shareLast, } from '@iqser/common-ui'; -import { combineLatest, delay, Observable, pipe } from 'rxjs'; -import { distinctUntilChanged, map, tap } from 'rxjs/operators'; +import { combineLatest, delay, Observable } from 'rxjs'; +import { map, tap } from 'rxjs/operators'; import { File } from '@red/domain'; import { ExcludedPagesService } from '../../services/excluded-pages.service'; import { MultiSelectService } from '../../services/multi-select.service'; @@ -165,7 +164,7 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnDestroy delay(0), map(([annotations, primary, secondary]) => this._filterAnnotations(annotations, primary, secondary)), map(annotations => this._mapListItemsFromAnnotationWrapperArray(annotations)), - tap(() => this._changeDetectorRef.detectChanges()), + tap(() => setTimeout(() => this._changeDetectorRef.detectChanges())), ); }