use BehaviorSubject

This commit is contained in:
Niels Lyngsø
2023-01-10 21:41:08 +01:00
parent a3b3de88b5
commit 26db569ad7

View File

@@ -1,14 +1,15 @@
import { BehaviorSubject } from 'rxjs';
import type { Entity, ManifestSection, ManifestSectionView, ManifestTree } from '@umbraco-cms/models';
import { UniqueBehaviorSubject } from 'src/core/observable-api/unique-behavior-subject';
export class UmbSectionContext {
#manifest;
public readonly manifest;
// TODO: what is the best context to put this in?
private _activeTree = new UniqueBehaviorSubject<ManifestTree | undefined>(undefined);
private _activeTree = new BehaviorSubject<ManifestTree | undefined>(undefined);
public readonly activeTree = this._activeTree.asObservable();
// TODO: what is the best context to put this in?