Skip to content

Commit

Permalink
fix: angular mat-form-fiel error
Browse files Browse the repository at this point in the history
  • Loading branch information
wg102 committed Aug 21, 2020
1 parent 7ad65c2 commit 20ff2f9
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions frontend/src/app/resource-form/volume/volume.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,18 @@
<!-- Volume Name Input -->
<mat-form-field appearance="outline" id="name">
<mat-label>Name</mat-label>
<input matInput formControlName="name" *ngIf="volume.value.type == 'New'" />
<mat-select formControlName="name" *ngIf="volume.value.type == 'Existing'">
<mat-option *ngFor="let pvc of existingPVCs" [value]="pvc">{{ pvc }}</mat-option>
</mat-select>
<input
matInput
formControlName="name"
*ngIf="volume.value.type == 'New'; else existingPvcControl"
/>
<ng-template #existingPvcControl>
<mat-select formControlName="name">
<mat-option *ngFor="let pvc of existingPVCs" [value]="pvc">{{
pvc
}}</mat-option>
</mat-select>
</ng-template>
</mat-form-field>

<!-- Size Input -->
Expand Down

0 comments on commit 20ff2f9

Please sign in to comment.