Added natural sort for alpha sort to remedy RO number sorting IO-465

This commit is contained in:
Patrick Fic
2020-12-16 20:06:09 -08:00
parent 9655d57fb8
commit 0a1a9c199d
3 changed files with 34 additions and 5 deletions

View File

@@ -3,9 +3,12 @@ export function alphaSort(a, b) {
let B;
A = a ? a.toLowerCase() : "";
B = b ? b.toLowerCase() : "";
if (A < B)
//sort string ascending
return -1;
if (A > B) return 1;
return 0; //default return value (no sorting)
return A.localeCompare(B);
// if (A < B)
// //sort string ascending
// return -1;
// if (A > B) return 1;
// return 0; //default return value (no sorting)
}