Row count after filter

UI Components for React
Post Reply
Posts: 5
Joined: 04 Jun 2019, 02:24

19 Jun 2019, 06:27

Probably asked a million times guys... I can console.log the new filtered record count but every time I try to setState I get the "max loops" error in ReactJS because the DT re-renders...

I really REALLY need the # of recs // not pages // after a filter


Thanks kindly!

User avatar
Posts: 3641
Joined: 29 Jun 2013, 12:38

24 Jun 2019, 09:31


Could you please attach a codesandbox link for us? Also, do you use onFilter method to calculate row counts? Please see;

You can use to provide the sample.

Best Regards,

Posts: 5
Joined: 04 Jun 2019, 02:24

24 Jun 2019, 19:06

Here ya go: ... ontsize=14

I know the {this.state.totalRecords} is incorrect for the filteredCount.

I see in the source for DataTable.js for method processData(localState) {} line 1080 (before the return data) if I console.log(data.length) the filteredCount is there but it never manifests itself anywhere else.

How can I use that for my filteredRecord count?

Thank you very much for your time & help with this

Posts: 5
Joined: 04 Jun 2019, 02:24

31 Jul 2019, 20:47

well I suppose the answer is... do it my damn self

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest