Disable does not work on the Material Toggle Buttons

101 views
Skip to first unread message

Crystal O'Mara

unread,
Apr 8, 2020, 9:37:53 PM4/8/20
to angular-material2
I can't get the Material Toggle Buttons to become disabled (please help!):

1. I've tried passing true = "[disabled]="true""
2. I've tried binding a value that was true 
3. I've tried just placing the "disabled" attribute with no binding

<mat-button-toggle-group
aria-label="Choose Location Identifier"
value="searchByAddress"
>
<mat-button-toggle
(click)="searchByAddress = true"
value="searchByAddress"
[disabled]="true"
>
Location
</mat-button-toggle>
<mat-button-toggle
(click)="searchByAddress = false"
value="searchByCircuit"
disabled
>
Circuit ID
</mat-button-toggle>
</mat-button-toggle-group>
Reply all
Reply to author
Forward
0 new messages