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

344
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
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