mariuszfoltak/angular2-datatable

How I can get rows count after filtered DATA?

Opened this issue · 2 comments

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

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;
}

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