Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

166
Views
How to compare items in <ng-select> with another array to get only unique items in the select options

i would like to know how u can use ng-select to only show items which aren't in the array the user is trying to add to (unique in comparison with the other array). This is an example:

<ng-select
   *ngIf="!value"
   [(ngModel)]="this.arrayOfSelectedItems[rowIndex]"
   [items]="this.arrayOfAllPotentialItems()"
   appendTo="body"
  (change)="this.refreshRows()
>
   <ng-template ng-option-tmp let-item="item">
       {{item.name}}
   </ng-template>
</ng-select>

When trying to use a function in the [items] input to compare and filter the unique items it shows the correct unique items, but i'm unable to make a selection.

Could anyone help me out?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!