mirror of
https://github.com/gosticks/react-table.git
synced 2026-08-12 04:50:20 +00:00
[useSort] Add sort order custom sortMethod (#1615)
Added sort order as parameter for calling sortMethod(will be useful to provide more control in custom sortMethod)
This commit is contained in:
@@ -296,7 +296,7 @@ function useInstance(instance) {
|
||||
|
||||
// Return the correct sortFn.
|
||||
// This function should always return in ascending order
|
||||
return (a, b) => sortMethod(a, b, sort.id)
|
||||
return (a, b) => sortMethod(a, b, sort.id, sort.desc)
|
||||
}),
|
||||
// Map the directions
|
||||
availableSortBy.map(sort => {
|
||||
|
||||
Reference in New Issue
Block a user