Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

170
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda