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

212
Views
Por qué el evento gridApi.onFilterChanged() redirige la página

Tengo un botón para responder a la función de filtro.

 <div class="col-md-1"> <button (click)="applyFilter()" class="btn btn-primary" style="float: right;">Search</button> </div> applyFilter() { this.gridApi.onFilterChanged(); } isExternalFilterPresent(): boolean { return true; } doesExternalFilterPass(node: RowNode): boolean { return true; } constructor(private http: HttpClient, private _snackBar: MatSnackBar) { this.gridOptions = { editType: 'fullRow', columnDefs: this.columnDefs, pagination: true, animateRows: true, isExternalFilterPresent: this.isExternalFilterPresent.bind(this), doesExternalFilterPass: this.doesExternalFilterPass.bind(this), }; } <ag-grid-angular style="width: 100%; height:600px;" class="ag-theme-alpine" [defaultColDef]="defaultColDef" rowSelection='single' [gridOptions]="gridOptions" (rowValueChanged)="onRowChanged($event)" (gridReady)="onGridReady($event)"> </ag-grid-angular>

implementación de filtro externo muy básico para ag-Grid

sin embargo, al hacer clic en el botón de búsqueda, toda la página se dirige a la página anterior, lo cual es muy extraño y no puedo depurar.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Bueno, no estoy seguro de si es la mejor manera de resolverlo, pero lo hice funcionar devolviendo un false a applyFilter()

 applyFilter() { this.gridApi.onFilterChanged(); return false; /// yea that fix it... }

Entonces @nullptr.t tiene razón, el botón actúa como enviar el formulario en lugar del botón

about 4 years ago · Juan Pablo Isaza Report
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!