I am using angular material 7.2.0
.
I am trying to disable form fields using fieldset
container.
for input controls it works, but not for mat-select
.
I know I can declare it in both fieldset and mat-select and it works but I want more generic code to affect this.
sample of my code:
<fieldset disabled="true">
<form>
<div>
<label>סיבת הבדיקה</label>
<mat-form-field>
<mat-select>
<mat-option [value]="undefined||null"></mat-option>
<mat-option *ngFor="let reason of reasons"
[value]="reason.Code"
[matTooltip]="reason.Desc">
{{reason.Desc}}
</mat-option>
</mat-select>
<mat-error>
חובה להזין ערך בשדה
</mat-error>
</mat-form-field>
</div>
<div>
<label>הערות</label>
<mat-form-field>
<textarea maxlength="1200"></textarea>
</mat-form-field>
</div>
<div>
<label>מבצע</label>
<mat-form-field>
<input matInput
maxlength="100" />
<mat-error>
חובה להזין ערך בשדה
</mat-error>
</mat-form-field>
</div>
</form>
</fieldset>
Any idea?