Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing first row in pager cacheIndex #1714

Closed
keikland opened this issue Mar 3, 2020 · 1 comment
Closed

Missing first row in pager cacheIndex #1714

keikland opened this issue Mar 3, 2020 · 1 comment
Labels

Comments

@keikland
Copy link

keikland commented Mar 3, 2020

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

@Mottie
Copy link
Owner

Mottie commented Mar 3, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants