SearchPanes: CascadePanes shows wrong count on null data

SearchPanes: CascadePanes shows wrong count on null data

DirkScDirkSc Posts: 2Questions: 2Answers: 0
edited August 2022 in Free community support

Link to test case: http://live.datatables.net/qoqerupa/1/edit
Description of problem: null data count always shows as zero.

I updated SearchPanes from 1.4 to 2.0.2 and stumbled upon a problem with wrong counting of null values.

Building the report upon original thread with wrong counts showing up in SearchPanes > 2.0 which was partially fixed in 2.0.2 and the provided example which I cloned and just edited two first names to null. (see: https://datatables.net/forums/discussion/72669). If you select the "no data" entry in the search pane the 2 values get correctly shown in the table.

Setting cascadePanes to false shows the right count of 2.

Cheers,

Dirk

Answers

  • casscass Posts: 8Questions: 3Answers: 0

    I had the same issue. Turned out SearchPanes had a problem with NULL values. In my case, I was returning data from a database query, with the empty cells containing NULL values. The counts for "No data" were always zero with cascadePanes activated, as you have described.

    When I modified the query to detect NULL and return an empty string instead, the counts were all correct.

Sign In or Register to comment.