correct types
This commit is contained in:
@@ -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)
|
||||
);
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user