Skip to content

Commit

Permalink
fix: dont use getter for observable
Browse files Browse the repository at this point in the history
  • Loading branch information
derschnee68 committed Jan 18, 2024
1 parent 1adcfe6 commit 16cc14e
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
} from '@dasch-swiss/vre/shared/app-state';
import { Actions, Select, Store, ofActionSuccessful } from '@ngxs/store';
import { Observable, Subject, Subscription, combineLatest } from 'rxjs';
import { map, takeUntil } from 'rxjs/operators';
import { map, takeUntil, tap } from 'rxjs/operators';
import {
ComponentCommunicationEventService,
EmitEvent,
Expand All @@ -42,12 +42,13 @@ export class OntologyClassItemComponent implements OnInit, AfterViewInit, OnDest

@ViewChild('resClassLabel') resClassLabel: ElementRef;

get results$(): Observable<number> {
return combineLatest([
this._store.select(OntologyClassSelectors.classItems),
this._store.select(OntologyClassSelectors.isLoading),
]).pipe(map(([classItems]) => classItems[this.resClass.id]?.classItemsCount));
}
results$ = combineLatest([
this._store.select(OntologyClassSelectors.classItems),
this._store.select(OntologyClassSelectors.isLoading),
]).pipe(
map(([classItems]) => classItems[this.resClass.id]?.classItemsCount),
tap(v => console.log('ontology class item', v))
);

classLink: string;

Expand Down

0 comments on commit 16cc14e

Please sign in to comment.