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

Sort issue with multiple keys #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Sort issue with multiple keys #3

wants to merge 1 commit into from

Conversation

aaronholsonege
Copy link

There is an issue with the sort method when multiple keys are specified and one of them has a desc flag ('-column').

Here is an example: http://jsfiddle.net/tFrGu/

@@ -712,7 +712,7 @@ var jl;
framework.util.each(groups, function(group) {
var listing = fields.slice();
var records = framework.util._performSort(group, listing, ignoreCase);
sorted = sorted.concat(records);
sorted = (desc) ? records.concat(sorted) : sorted.concat(records);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will account for sort columns that are descending by applying concat to the records array (if descending) instead of the sorted array (is ascending -- default).

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.

1 participant