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

HtmlTable.Sort multisort fix #1011

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

csghormley
Copy link

I made this set of changes to permit multi-column sorting as I thought it should work per the existing documentation. That is, you can call sort() on multiple columns with the prepare parameter set to true, then call sort() with prepare=false to execute the sort. Further, you can now specify the sort direction for each sorted column. The serialize() function now returns an object that can be used to restore the state of a table that was sorted on multiple columns.

Testing...I have been too busy, or lazy, depending on how you look at it, to write tests for this. But it is working in my application, which redraws tables all the time using the restore() function, and uses the presort feature to sort by date in addition to the selected column.

The presort and restore features have not been exercised very much with more than one extra column.

This is an attempt to fix #573. Secondary sort column is provided for
in the documentation but didn't work. Keep track of sort direction
for any sorted column.

Need to add a test for this feature. No doubt class state and method
arguments could be cleaned up.
@csghormley
Copy link
Author

Arian et al, is there anything else I can do to help close this issue?

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

Successfully merging this pull request may close these issues.

2 participants