question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Search Filter for all pages not working

See original GitHub issue

Hi ,

I am trying apply search filter input box for all paginations but when i have tagged filter it only take within page items not an entire array I have gone through filter source code

my filter code is like below

import { Pipe, PipeTransform, Injectable } from '@angular/core';
@Pipe({
    name: 'filter'
})
@Injectable()
export class FilterPipeSearch implements PipeTransform {
    transform(items: any[], field: string, value: string): any[] {
        if (!items) {
            return [];
        }
        if (!field || !value) {
            return items;
        }
        return items.filter(singleItem => singleItem[field].toLowerCase().includes(value.toLowerCase()));
    }

}

It filtering within page items but not all pages Can you please help me out of this?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

13reactions
michaelbromleycommented, Aug 1, 2017

Thanks. As I suspected, the pipes are in the wrong sequence. Currently you are paginating and then filtering. You should be filtering first:

 <tr *ngFor="let item of dataTable  | filter : 'accountNumber' : accountNumber | paginate: { itemsPerPage: 10, currentPage: p } ; let i=index "></tr>
0reactions
rostom93commented, Jun 28, 2022

thank you i will do that

Read more comments on GitHub >

github_iconTop Results From Across the Web

Search filter for all pages not working in Angular 8. #368
I am able to search within pages but not all pages. I have even put the filter first and then paginate but it's...
Read more >
6.7 How to Use Filter on All Pages in Power BI - YouTube
Description:One filter applied should be applied to all pages. This is possible in Power Bi with the help of " Filter on All...
Read more >
Filter on all pages not apllied to the web report
I have created a filter on my desktop to apply to all pages. When I publish to web that filter is not applied...
Read more >
Filter the number of pages not working django - Stack Overflow
I have a page where it will display the details that is in my database in a form of a table, I am...
Read more >
Modern Pages - Highlighted content not filtering search results ...
Hi all, I want to show pages from a different site collection using the highlighted content with a filter on Content includes the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found