mirror of
https://github.com/gosticks/react-table.git
synced 2026-06-28 17:10:01 +00:00
Fix descending sort being non-deterministic
Descending sort would sort differently for the same data on rerender for items that evaluated to the same value.
This commit is contained in:
@@ -80,7 +80,7 @@ function orderBy (arr, funcs, dirs) {
|
||||
}
|
||||
return dirs[0]
|
||||
? a.__index - b.__index
|
||||
: b.__index - b.__index
|
||||
: b.__index - a.__index
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user