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

Pager doesn't show rows after changing sort order #1466

Closed
pevgeniev opened this issue Oct 19, 2017 · 5 comments
Closed

Pager doesn't show rows after changing sort order #1466

pevgeniev opened this issue Oct 19, 2017 · 5 comments

Comments

@pevgeniev
Copy link

pevgeniev commented Oct 19, 2017

There is an issue with the pager when sorting twice on the same column. First it hides the rows, that are not in the current page, but after the reverse sort it doesn't show them.
The error is in renderTable when using pager_removeRows = true:

if ( !wo.pager_removeRows ) { tsp.hideRows( c ); } else{ ts.clearTableBody( table ); ....
The code in else adds the necessary number of rows, but since they already have display='none' set to them from the previous sort and there is no code to show them, they end up being hidden.
My initial fix was to call tsp.hideRows(c) befor the closing 'else' like:
ts.processTbody( table, $tb, false ); tsp.hideRows( c ); }
but since I don't know well enough this plugin, I don't know if that would be optimal and correct solution.

@pevgeniev pevgeniev changed the title Pager doesn't show rows changing sort order Pager doesn't show rows after changing sort order Oct 19, 2017
@Mottie
Copy link
Owner

Mottie commented Oct 19, 2017

Hi @pevgeniev!

I set up this demo using the pager widget with pager_removeRows set to true and I'm not seeing the problem. Would you please modify the demo to duplicate the problem you're seeing.

@pevgeniev
Copy link
Author

pevgeniev commented Oct 19, 2017 via email

@pevgeniev
Copy link
Author

pevgeniev commented Oct 19, 2017 via email

@Mottie
Copy link
Owner

Mottie commented Oct 20, 2017

Sorry, busy day... I'll look at this tomorrow.

@Mottie
Copy link
Owner

Mottie commented Mar 18, 2018

Sorry for the long delay! 😿This should be fixed in v2.30.0!

@Mottie Mottie closed this as completed Mar 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants