Skip to content

Commit

Permalink
Update sorting.md
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinVandy committed Mar 8, 2024
1 parent ab0c5e0 commit 16d16dd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/guide/sorting.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ const [sorting, setSorting] = useState<SortingState>([])
const table = useReactTable({
columns,
data,
// getCoreRowModel: getCoreRowModel(), //not needed for manual sorting
getCoreRowModel: getCoreRowModel(),
//getSortedRowModel: getSortedRowModel(), //not needed for manual sorting
manualSorting: true, //use pre-sorted row model instead of sorted row model
state: {
sorting,
Expand Down Expand Up @@ -405,4 +406,4 @@ There are a lot of sorting related APIs that you can use to hook up to your UI o
- `column.getSortingFn` - Returns the exact sorting function being used for a column.

- `column.getCanMultiSort` - Useful for enabling/disabling the multi-sorting UI for a column.
- `column.getSortIndex` - Useful for showing a badge or indicator of the column's sort order in a multi-sort scenario. i.e. whether or not it is the first, second, third, etc. column to be sorted.
- `column.getSortIndex` - Useful for showing a badge or indicator of the column's sort order in a multi-sort scenario. i.e. whether or not it is the first, second, third, etc. column to be sorted.

0 comments on commit 16d16dd

Please sign in to comment.