Commits

Nicolai Olsen authored 7af29899895
added onClick event to deselect selected radio buttons
No tags

src/app/radio-group/radio-group.component.html

Modified
1 1 <div class="container" [ngClass]="{disabled: disabled}">
2 2 <label class="label" id="group-label">{{label}}</label>
3 3 <mat-radio-group required [name]="name" [(ngModel)]="value" color="primary" [disabled]="disabled || notRelevant">
4 - <mat-radio-button *ngFor="let option of options" [value]="option.value">{{option.label}}</mat-radio-button>
4 + <mat-radio-button *ngFor="let option of options" [value]="option.value" (click)="onClick($event, option.value)">{{option.label}}</mat-radio-button>
5 5 </mat-radio-group>
6 6 </div>
7 7 <div class="hidden">
8 8 <ng-content></ng-content>
9 9 </div>

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut