Give an option for null studies
This commit is contained in:
parent
8ec3216458
commit
de596607a1
|
@ -10,7 +10,11 @@ export class SettingsService {
|
|||
constructor() { }
|
||||
|
||||
setStudyIdForValidation(id: number) {
|
||||
localStorage.setItem(this.studyIdKey, id.toString());
|
||||
if (id != null) {
|
||||
localStorage.setItem(this.studyIdKey, id.toString());
|
||||
} else {
|
||||
localStorage.removeItem(this.studyIdKey)
|
||||
}
|
||||
}
|
||||
|
||||
getStudyIdForValidation() {
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<mat-label>Select Study</mat-label>
|
||||
<mat-hint>Here you can specify a default study to use when performing validation.</mat-hint>
|
||||
<mat-select matNativeControl required [(value)]="selectedStudyId" (selectionChange)="selectStudy($event.value)">
|
||||
<mat-option [value]="null"> No study selected </mat-option>
|
||||
<mat-option *ngFor="let s of studies" [value]="s.id">
|
||||
{{s.id}} - {{s.title}}
|
||||
</mat-option>
|
||||
|
|
Loading…
Reference in New Issue