mirror of
https://github.com/gosticks/react-table.git
synced 2026-08-11 20:40:17 +00:00
Retain original data order if no sorting is found
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user