I have a situation where i need to group data in ng-select and in both group i have same id exists, so when i bind using [(ngModel)] , even though i selected item from one group , its getting selected from another group. I hope somebody has solution for this issue. Thanks in advance
<label>Grouping</label>
<ng-select [items]="data"
bindLabel="name"
bindValue="id"
groupBy="type"
[(ngModel)]="selectedValue">
</ng-select>
`
selectedValue= 1
data= [
{id: 1, type: SystemVariables, name: Week},
{id: 2, type: SystemVariables, name: Week},
{id: 3, type: SystemVariables, name: Week},
{id: 1, type: CustomVariables, name: c1},
{id: 2, type: CustomVariables, name: c2},
{id: 3, type: CustomVariables, name: c3}];