correct types

This commit is contained in:
Niels Lyngsø
2023-01-04 10:04:21 +01:00
parent 0e253a0212
commit 92d87a0321
2 changed files with 4 additions and 4 deletions

View File

@@ -53,7 +53,7 @@ export class UmbInputPickerUserGroupElement extends UmbObserverMixin(UmbInputLis
private _observeUserGroups() {
if (this.value.length > 0 && this._userGroupStore) {
this.observe<Array<UserGroupEntity>>(
this.observe(
this._userGroupStore.getByKeys(this.value),
(userGroups) => (this._userGroups = userGroups)
);

View File

@@ -59,7 +59,7 @@ export class UmbDocumentTypeWorkspaceElement extends UmbLitElement {
private _workspaceContext?: UmbWorkspaceDocumentTypeContext;
@state()
private _documentType?: DocumentTypeDetails | null;
private _documentType?: DocumentTypeDetails;
private _modalService?: UmbModalService;
@@ -82,9 +82,9 @@ export class UmbDocumentTypeWorkspaceElement extends UmbLitElement {
private async _observeWorkspace() {
if (!this._workspaceContext) return;
this.observe<UmbDocumentTypeStoreItemType>(this._workspaceContext.data.pipe(distinctUntilChanged()), (data) => {
this.observe(this._workspaceContext.data.pipe(distinctUntilChanged()), (data) => {
// TODO: make method to identify if data is of type DocumentTypeDetails
this._documentType = (data as DocumentTypeDetails | null);
this._documentType = (data as DocumentTypeDetails);
});
}