Skip to content

Commit

Permalink
fix select informatieobjecttype (#996)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbritense authored May 16, 2024
1 parent 0522994 commit 0fba41e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ <h3 cdsModalHeaderHeading>
id="informatieobjecttype"
(selected)="informatieobjecttypeSelected($event)"
>
<cds-dropdown-list [items]="obs.documentTypeItems"></cds-dropdown-list>
<cds-dropdown-list [items]="obs.documentTypeItems || []"></cds-dropdown-list>
</cds-dropdown>
</div>
</ng-container>
Expand Down Expand Up @@ -206,7 +206,7 @@ <h3 cdsModalHeaderHeading>
(selected)="tagsSelected($event)"
>
>
<cds-dropdown-list [items]="tagItems$ | async"></cds-dropdown-list>
<cds-dropdown-list [items]="(tagItems$ | async) || []"></cds-dropdown-list>
</cds-combo-box>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,18 +295,21 @@ export class DocumentenApiMetadataModalComponent implements OnInit, OnChanges, O
documentDefinitionName
)
),
switchMap(([params, firstChildParams, documentDefinitionName]) =>
this.documentService.getDocumentTypes(
params?.documentDefinitionName ||
firstChildParams?.documentDefinitionName ||
documentDefinitionName
)
switchMap(([params, firstChildParams, documentDefinitionName, informatieobjecttypeValue]) =>
combineLatest([
this.documentService.getDocumentTypes(
params?.documentDefinitionName ||
firstChildParams?.documentDefinitionName ||
documentDefinitionName
),
of(informatieobjecttypeValue),
])
),
map(documentTypes =>
map(([documentTypes, informatieobjecttypeValue]) =>
documentTypes.map((type: any) => ({
id: type.url,
content: type.name,
selected: this.informatieobjecttypeFormControl.value?.toString() === type.name,
selected: informatieobjecttypeValue === type.url,
}))
)
);
Expand Down

0 comments on commit 0fba41e

Please sign in to comment.