Skip to content
Snippets Groups Projects
Unverified Commit 159b117b authored by Kyle Doherty's avatar Kyle Doherty Committed by GitHub
Browse files

use case insensitive sorting on strings in TableSimple (#11541)

Fixes #11338
parent 78bc3606
No related branches found
No related tags found
No related merge requests found
......@@ -109,7 +109,14 @@ export default class TableSimple extends Component {
let rowIndexes = _.range(0, rows.length);
if (sortColumn != null) {
rowIndexes = _.sortBy(rowIndexes, rowIndex => rows[rowIndex][sortColumn]);
rowIndexes = _.sortBy(rowIndexes, rowIndex => {
let value = rows[rowIndex][sortColumn];
// for strings we should be case insensitive
if (typeof value === "string") {
value = value.toLowerCase();
}
return value;
});
if (sortDescending) {
rowIndexes.reverse();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment