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

346
Visualizações
use of use `getfilterinstance` in angular

i have a doubt, i use gridapi.getfilterinstance in the angular app it works fine. but the main problem is that i create a custom search box and i have two columns in grid table firstname and lastname

i want to search in both of them. what i create is

  onSearch() {
    const row = this.reportTable.gridApi.getFilterInstance('contact.firstName');
    let filter = this.form.value['text'];
    let condition = {
      type: 'startsWith',
      filter
    };
    row.setModel(condition);
    this.reportTable.gridApi.onFilterChanged();
  }
<button class="primary-btn mr-2" (click)="onSearch()">
 Search
</button>

i need another condition with this firstname instance i,e. contact.lastName which is trigger with the same search button and search field.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I would suggest using an external filter. This enables you to search based on whatever condition you want. In your case this would be against firstName and lastName. Main steps are:

  1. Provide a function that returns true when you want to use your external filter to isExternalFilterPresent
  2. Implement doesExternalFilterPass with your custom logic.

I have created a plunkr based of the documentation example that shows filtering based off both the athlete name or country.

https://plnkr.co/edit/9DkvMyH234Xr8CJo

about 4 years ago · Juan Pablo Isaza Relatório
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