Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

164
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda