Open arinhere opened 6 years ago
Hi,
In my app, I have 3 ng-select on a single page. Each of the cases have multiple enabled.
What I tried to achieve is, to set different initial selection, when the page is loading.
What I have done so far
<ng-select (data)="value" [multiple]="true" [items]="participants" [disabled]="disabled" (data)="refreshValue($event)" (selected)="selected($event)" (removed)="removed($event)" [(ngModel)]="selectedCharacters" name="participantlist{{i}}">
Interesting part is, [(ngModel)]="selectedCharacters" works, if its static. But if I tried to iterate it like selectedCharacters[i], it stopped working.
Any idea, how to resolve this issue.
Please let me know
Thanks
Hi,
In my app, I have 3 ng-select on a single page. Each of the cases have multiple enabled.
What I tried to achieve is, to set different initial selection, when the page is loading.
What I have done so far
<ng-select (data)="value" [multiple]="true" [items]="participants" [disabled]="disabled" (data)="refreshValue($event)" (selected)="selected($event)" (removed)="removed($event)" [(ngModel)]="selectedCharacters" name="participantlist{{i}}">
Interesting part is, [(ngModel)]="selectedCharacters" works, if its static. But if I tried to iterate it like selectedCharacters[i], it stopped working.
Any idea, how to resolve this issue.
Please let me know
Thanks