Skip to content

HtmlTable.Sort multisort fix#1011

Open
csghormley wants to merge 5 commits into
mootools:masterfrom
csghormley:htmltable-multisort-fix
Open

HtmlTable.Sort multisort fix#1011
csghormley wants to merge 5 commits into
mootools:masterfrom
csghormley:htmltable-multisort-fix

Conversation

@csghormley
Copy link
Copy Markdown

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
Copy Markdown
Author

@csghormley
Copy link
Copy Markdown
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