always sort by title after sorting by initial input

This commit is contained in:
David 2018-12-29 10:50:05 -05:00
parent 914ad2c204
commit d16d5dcd7c

View File

@ -70,7 +70,9 @@
}
sortState.sortBy = sortField;
}
data = _.orderBy(data, function(o) { return o[sortState.sortBy].toLowerCase(); }, sortState.sortOrder);
data = _.orderBy(data, function(o) {
return o[sortState.sortBy].toLowerCase() + o["sortTitle"].toLowerCase();
}, sortState.sortOrder);
$.each(data, function(key, value) {
value.rowNumber = key; // re-key for new sort