#Better function generic support for react-table v8

5 messages · Page 1 of 1 (latest)

hybrid narwhalBOT
#
costaNull#0127

Preview:```ts
import {
FilterFn,
RowData,
SortingFn,
Row,
createColumnHelper,
} from "@tanstack/react-table"

/**
*

  • React Table helper to sort tables
  • based on boolean values

*/
export function customBooleanSortCompare<
TData extends RowData

(
rowA: Row<TData>,
rowB:
...```

open quarry
#

The problem occurs when I try to use a custom sort function

restive field
#

sortingFn should be an object with options, not a function

open quarry
#

Was just closing this, the issue was the extra param I was passing (decs):

hybrid narwhalBOT
#
costaNull#0127

Preview:```ts
import {
FilterFn,
RowData,
SortingFn,
Row,
createColumnHelper,
} from "@tanstack/react-table"

/**
*

  • React Table helper to sort tables
  • based on boolean values

*/
export function customBooleanSortCompare<
TData extends RowData

(
rowA: Row<T
...```