How I can get rows count after filtered DATA?
Opened this issue · 2 comments
DiegoVenancioVieira commented
I need show the filter result row count (ARRAY SIZE AFTER FILTERED) in frontend... Somebody know how I can do?
09abhishek commented
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 commented
@09abhishek where I see the (ARRAY SIZE AFTER FILTERED) in this?