Retain original data order if no sorting is found

This commit is contained in:
Tanner Linsley
2017-02-10 14:48:55 -07:00
parent 3984a540c1
commit cce77d24f2
+3
View File
@@ -273,6 +273,9 @@ export default {
// }]
},
sortData (data, sorting) {
if (!sorting.length) {
return data
}
const sorted = _.orderBy(data, sorting.map(sort => {
return row => {
if (row[sort.id] === null || row[sort.id] === undefined) {