tsc corrections

This commit is contained in:
Niels Lyngsø
2025-02-04 15:15:13 +01:00
parent c741ba2228
commit 00b92d8a57
2 changed files with 4 additions and 9 deletions

View File

@@ -175,13 +175,6 @@ export class UmbBlockGridEntryElement extends UmbLitElement implements UmbProper
},
null,
);
this.observe(
this.#context.isValidBlockType,
(valid) => {
this._invalidBlockType = valid;
},
null,
);
// TODO: Implement index.
this.observe(
this.#context.label,

View File

@@ -410,8 +410,10 @@ export class UmbBlockGridEntriesContext
return this._catalogueRouteBuilderState.getValue()?.({ view: 'clipboard', index: index });
}
blockTypeOf(contentTypeKey: string) {
return this.#allowedBlockTypes.getValue().find((x) => x.contentElementTypeKey === contentTypeKey);
override blockTypeOf(contentTypeKey: string) {
return this.#allowedBlockTypes.asObservablePart((types) =>
types.find((x) => x.contentElementTypeKey === contentTypeKey),
);
}
/*