Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How I can get rows count after filtered DATA? #159

Open
DiegoVenancioVieira opened this issue May 27, 2018 · 2 comments
Open

How I can get rows count after filtered DATA? #159

DiegoVenancioVieira opened this issue May 27, 2018 · 2 comments

Comments

@DiegoVenancioVieira
Copy link

DiegoVenancioVieira commented May 27, 2018

I need show the filter result row count (ARRAY SIZE AFTER FILTERED) in frontend... Somebody know how I can do?

@09abhishek
Copy link

You can use pipe implementation for that :

import * as _ from "lodash";
import {Pipe, PipeTransform} from "";

@pipe({
name: "dataFilter"
})
export class DataFilterPipe implements PipeTransform {

transform(array: any[], query: string): any {
if (query) {
return _.filter(array, row=>row.name.indexOf(query) > -1 || row.email.indexOf(query) > -1);
return array;
}

@DiegoVenancioVieira
Copy link
Author

@09abhishek where I see the (ARRAY SIZE AFTER FILTERED) in this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants