From 538c06d1400c724b932ed878406c0775bcb2988b Mon Sep 17 00:00:00 2001 From: Jiajun Chen Date: Mon, 18 Dec 2023 00:49:30 +0800 Subject: [PATCH] docs: fix wrong description in sorting.md (#5134) See https://github.com/TanStack/table/blob/a1e9732e6fc3446a2ae80db72a1f2b46a5c11e46/packages/table-core/src/sortingFns.ts#L54 --- docs/api/features/sorting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/features/sorting.md b/docs/api/features/sorting.md index 33ea67166a..9fd28c9951 100644 --- a/docs/api/features/sorting.md +++ b/docs/api/features/sorting.md @@ -37,7 +37,7 @@ The following sorting functions are built-in to the table core: - `datetime` - Sorts by time, use this if your values are `Date` objects. - `basic` - - Sorts using a basic/standard `a > b ? -1 : b < a ? 1 : 0` comparison. This is the fastest sorting function, but may not be the most accurate. + - Sorts using a basic/standard `a > b ? 1 : a < b ? -1 : 0` comparison. This is the fastest sorting function, but may not be the most accurate. Every sorting function receives 2 rows and a column ID and are expected to compare the two rows using the column ID to return `-1`, `0`, or `1` in ascending order. Here's a cheat sheet: