[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:
gargroh
2020-01-09 06:17:12 -07:00
committed by Tanner Linsley
parent 5778bc3dce
commit 6ebf3183a0
+1 -1
View File
@@ -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 => {