Fixes bug on preview of dataset template on dmp editor, dataset editor
This commit is contained in:
parent
2eb608a897
commit
b3bf7ab73d
|
@ -7,7 +7,7 @@
|
|||
<div class="heading">1.0 {{'DATASET-EDITOR.FIELDS.PROFILE' | translate}}*</div>
|
||||
<div class="profile-form">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="{{'DATASET-WIZARD.FIRST-STEP.PROFILE'| translate}}" [required]="true" formControlName="profile">
|
||||
<mat-select placeholder="{{'DATASET-WIZARD.FIRST-STEP.PROFILE'| translate}}" [required]="true" [compareWith]="compareWith" [formControl]="formGroup.get('profile')">
|
||||
<mat-option *ngFor="let profile of availableProfiles" [value]="profile">
|
||||
{{profile.label}}
|
||||
</mat-option>
|
||||
|
|
|
@ -323,6 +323,7 @@ export class DatasetEditorDetailsComponent extends BaseComponent implements OnIn
|
|||
request.criteria = criteria;
|
||||
return this.dmpService.searchDMPProfiles(request);
|
||||
}
|
||||
|
||||
allAvailableProfiles(event: MouseEvent) {
|
||||
event.stopPropagation();
|
||||
const dialogRef = this.dialog.open(AvailableProfilesComponent, {
|
||||
|
@ -332,4 +333,8 @@ export class DatasetEditorDetailsComponent extends BaseComponent implements OnIn
|
|||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
public compareWith(object1: any, object2: any) {
|
||||
return object1 && object2 && object1.id === object2.id;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue