Fixes: bug on multiple get calls
This commit is contained in:
parent
2f139471dc
commit
11a00ec26a
|
@ -55,7 +55,7 @@
|
|||
<mat-form-field class="col-md-6">
|
||||
<mat-select placeholder=" {{'DATASET-WIZARD.FIRST-STEP.PROFILE'| translate}}"
|
||||
[required]="true" formControlName="profile">
|
||||
<mat-option *ngFor="let profile of availableProfiles" [value]="profile.id" (onSelectionChange)="selctionChanged()">
|
||||
<mat-option *ngFor="let profile of availableProfiles" [value]="profile.id">
|
||||
{{profile.label}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
|
|
|
@ -163,6 +163,11 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
|
|||
.subscribe( () => {
|
||||
this.dmpValueChanged(this.formGroup.get('dmp').value);
|
||||
});
|
||||
this.formGroup.get('profile').valueChanges
|
||||
.pipe(takeUntil(this._destroyed))
|
||||
.subscribe(x => {
|
||||
this.datasetProfileValueChanged(x);
|
||||
});
|
||||
});
|
||||
} else if (dmpId != null) {
|
||||
this.isNew = true;
|
||||
|
@ -364,14 +369,6 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
|
|||
}
|
||||
}
|
||||
|
||||
selctionChanged() {
|
||||
this.formGroup.get('profile').valueChanges
|
||||
.pipe(takeUntil(this._destroyed))
|
||||
.subscribe(x => {
|
||||
this.datasetProfileValueChanged(x);
|
||||
});
|
||||
}
|
||||
|
||||
searchDmp(query: string): Observable<DmpListingModel[]> {
|
||||
const fields: Array<string> = new Array<string>();
|
||||
fields.push('asc');
|
||||
|
|
Loading…
Reference in New Issue