diff --git a/CHANGES.txt b/CHANGES.txt index cb1dcfc54..f486db0b2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -13,6 +13,10 @@ Fixes: - Issue 45: "Renaming Cells with Ctrl-Enter produced ERROR" Tentative fix for a concurrent bug. - Issue 46: "Array literals in GEL" +- Issue 55: "Use stable sorting for text facets sorted by count" + +Features: +- Row/record sorting (Issue 32) Changes: - Moved unit tests from JUnit to TestNG diff --git a/src/main/webapp/scripts/facets/list-facet.js b/src/main/webapp/scripts/facets/list-facet.js index 5deca3066..1116d8506 100644 --- a/src/main/webapp/scripts/facets/list-facet.js +++ b/src/main/webapp/scripts/facets/list-facet.js @@ -101,7 +101,8 @@ ListFacet.prototype._reSortChoices = function() { return a.v.l.localeCompare(b.v.l); } : function(a, b) { - return b.c - a.c; + var c = b.c - a.c; + return c !== 0 ? c : a.v.l.localeCompare(b.v.l); } ); };