This commit is contained in:
Niels Lyngsø
2023-01-04 10:12:04 +01:00
parent da41eaf0e8
commit ebe5ff486c
5 changed files with 13 additions and 13 deletions

View File

@@ -28,12 +28,12 @@ export class UmbCollectionViewMediaTableElement extends UmbLitElement {
private _observeCollectionContext() {
if (!this._collectionContext) return;
this.observe<Array<MediaDetails>>(this._collectionContext.data, (nodes) => {
this._mediaItems = nodes || undefined;
this.observe(this._collectionContext.data, (nodes) => {
this._mediaItems = nodes;
});
this.observe<Array<string>>(this._collectionContext.selection, (selection) => {
this._selection = selection || undefined;
this.observe(this._collectionContext.selection, (selection) => {
this._selection = selection;
});
}

View File

@@ -87,7 +87,7 @@ export class UmbBackofficeHeaderSections extends UmbLitElement {
private _observeSections() {
if (!this._sectionStore) return;
this.observe<ManifestSection[]>(this._sectionStore?.getAllowed(), (allowedSections) => {
this.observe(this._sectionStore.getAllowed(), (allowedSections) => {
this._sections = allowedSections;
this._visibleSections = this._sections;
});
@@ -96,7 +96,7 @@ export class UmbBackofficeHeaderSections extends UmbLitElement {
private _observeCurrentSection() {
if (!this._sectionStore) return;
this.observe<string>(this._sectionStore.currentAlias, (currentSectionAlias) => {
this.observe(this._sectionStore.currentAlias, (currentSectionAlias) => {
this._currentSectionAlias = currentSectionAlias;
});
}

View File

@@ -50,7 +50,7 @@ export class UmbBackofficeMain extends UmbLitElement {
private async _observeSections() {
if (!this._sectionStore) return;
this.observe<ManifestSection[]>(this._sectionStore?.getAllowed(), (sections) => {
this.observe(this._sectionStore.getAllowed(), (sections) => {
this._sections = sections;
if (!sections) return;
this._createRoutes();

View File

@@ -55,7 +55,7 @@ export class UmbContentPropertyElement extends UmbLitElement {
private _observeDataType() {
if (!this._dataTypeStore || !this._property) return;
this.observe<ManifestTypes>(
this.observe(
this._dataTypeStore.getByKey(this._property.dataTypeKey).pipe(
switchMap((dataType) => {
if (!dataType?.propertyEditorUIAlias) return EMPTY;

View File

@@ -59,7 +59,7 @@ export class UmbSectionElement extends UmbLitElement {
private _observeTrees() {
if (!this._sectionContext) return;
this.observe<ManifestTree[]>(
this.observe(
this._sectionContext?.data.pipe(
switchMap((section) => {
if (!section) return EMPTY;
@@ -71,13 +71,13 @@ export class UmbSectionElement extends UmbLitElement {
})
),
(trees) => {
this._trees = trees || undefined;
this._trees = trees;
this._createTreeRoutes();
}
);
this.observe<ManifestWorkspace[]>(umbExtensionsRegistry?.extensionsOfType('workspace'), (workspaceExtensions) => {
this._workspaces = workspaceExtensions || undefined;
this.observe(umbExtensionsRegistry.extensionsOfType('workspace'), (workspaceExtensions) => {
this._workspaces = workspaceExtensions;
this._createTreeRoutes();
});
}
@@ -117,7 +117,7 @@ export class UmbSectionElement extends UmbLitElement {
private _observeViews() {
if (!this._sectionContext) return;
this.observe<ManifestSectionView[]>(
this.observe(
this._sectionContext.data.pipe(
switchMap((section) => {
if (!section) return EMPTY;