Skip to content
Showing with 10 additions and 5 deletions.
  1. +10 −5 Source/Interface/HtmlTable.Sort.js
View
15 Source/Interface/HtmlTable.Sort.js
@@ -215,11 +215,16 @@ HtmlTable = Class.refactor(HtmlTable, {
rel = this.body.getParent();
this.body.dispose();
}
-
- var data = this.parseData(parser).sort(function(a, b){
- if (a.value === b.value) return 0;
- return a.value > b.value ? 1 : -1;
- });
+
+ var sorter = parser.sorter;
+ if (!sorter){
+ sorter = function(a, b){
+ if (a.value === b.value) return 0;
+ return a.value > b.value ? 1 : -1;
+ }
+ }
+
+ var data = this.parseData(parser).sort(sorter);
if (this.sorted.reverse == (parser == HtmlTable.Parsers['input-checked'])) data.reverse(true);
this.setRowSort(data, pre);

0 comments on commit 59eb7b6

Please sign in to comment.
Something went wrong with that request. Please try again.