`<mat-radio-group [ngClass]="cssForGroup" name="test">
<mat-radio-button *ngFor="let option of options | filter:searchText"
class="cssForRow"
[value]="option"
[checked]="option.isSelected"
(change)="selectOption($event)">
{{ option.value }}
<div class="info" [hidden]="!option.info">{{option.info}}</div>
</mat-radio-button>
</mat-radio-group>`
This the code I have for Radio buttons in a Group using angular material where option is an object. I have an issue where the option.value can be same for multiple options but the option.info is different. But when I select a radio button of such a case. All the buttons with the same option.value gets selected on UI.
I have tried adding name attribute to mat-radio-group. I have changed value attribute from an object to a unique key. I tried trackBy in ngFor. These solutions did not fix it.
Can somebody help me fix this?