Skip to content

Commit

Permalink
allow optional '+' prefix to trigger numerical sort
Browse files Browse the repository at this point in the history
  • Loading branch information
a5sk4s committed May 6, 2013
1 parent 5c1813d commit f3aff74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/SortService.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
return sortService.sortBool;
case "string":
// if number string return number string sort fn. else return the str
return item.match(/^-?[£$¤]?[\d,.]+%?$/) ? sortService.sortNumberStr : sortService.sortAlpha;
return item.match(/^[-+]?[£$¤]?[\d,.]+%?$/) ? sortService.sortNumberStr : sortService.sortAlpha;
default:
//check if the item is a valid Date
if (Object.prototype.toString.call(item) === '[object Date]') {
Expand Down

0 comments on commit f3aff74

Please sign in to comment.