Mottie/tablesorter

Missing first row in pager cacheIndex

keikland opened this issue · 1 comments

I am trying the obtain the row indexes of filtered rows from the pager cacheIndex array using the approach given in the docs. However, the first row is always missing.

I traced the problem to the hiderows() function definition, line 370 in jquery.tablesorter.pager.js (v2.31.0). "last" and "j" are both initialized to 0. This initialization makes the test on line 380 skip the first row, since last==j.

A solution seems to simply set "last = -1," in line 370. This makes it always pick up the first qualifying row.

Kjell

Hi @keikland!

Thanks for reporting this issue & how to fix it. I really appreciate it! I'll try to get a new release out soon.