My Code:
<mat-select
[formControl]="Rooms" [(ngModel)]="dropdown"placeholder="ChooseRooms"multiple>
<mat-option *ngFor="let room of RoomList" [value]="room">
{{room}}
</mat option>
</mat-select>
<mat-select
[formControl]="devices" [disabled] = "!dropdown"placeholder="ChooseDevices"multiple>
<mat-option [value]="device" disabled>
{{device}}
</mat-option>
</mat-select>
Problem:
In the above code, I have two dropdowns "Rooms" and "Devices" in which options are in the form of checkboxes.
From above code, I am able to enable second dropdown "devices" whenever I checked any checkbox in the first dropdown but, I am unable to disable the second dropdown "devices" whenever I unchecked any checkbox.