`<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>`
In the code snippet above, I have implemented radio buttons in a mat-radio-group using Angular Material. Each button corresponds to an object called "option". Currently, there is an issue where multiple options can have the same value, but different info. When selecting a radio button with a duplicate value, all buttons with that value are getting selected on the UI.
I've attempted solutions such as adding a name attribute to the mat-radio-group, changing the value attribute to a unique key, and implementing trackBy in ngFor, none of which resolved the issue. Can anyone provide assistance in fixing this problem?