Can you make an optgroup selectable?
<mat-form-field class="h-1 text-xs w-full">
<mat-select formControlName="source">
<mat-option [value]="defaultSource">All</mat-option>
<mat-optgroup *ngFor="let source of sources"
[label]="source.source">
<mat-option *ngFor="let subSource of source.subSources"
[value]="{'source': source.source,'type': subSource.name}">
{{ subSource.name }}
</mat-option>
</mat-optgroup>
</mat-select>
</mat-form-field>
I want to be able to select the top-level option and not just the children. Is it possible? Or is there a workaround for this?