0
Fork 0
mirror of https://github.com/TanStack/table.git synced 2026-11-18 18:55:54 +00:00
table/docs/reference/index/interfaces/ColumnDef_RowSorting.md
Kevin Van Cott 87c6bcc52a
feat(table-core): Further improve tree-shaking across features (#6626)
* feat(table-core): Further improve tree-shaking across features

Keep column ordering, column pinning, and row expanding code out of the
core bundle, route more cross-feature reads through feature stubs, and
stop allocating unused onAfterUpdate wrappers in production memos.

* refactor(table-core): register internal cross-feature fns as table APIs

Replace init*InstanceData function storage with @internal table APIs
registered via assignTableAPIs, route faceting through the
getCanGlobalFilter stub, and enforce feature boundaries with
import/no-restricted-paths. Regenerate reference docs and fix stale
docs config links.

---------
2026-10-12 09:51:47 -05:00

3.2 KiB

id title
ColumnDef_RowSorting ColumnDef_RowSorting

Defined in: features/row-sorting/rowSortingFeature.types.ts:118

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

Properties

enableMultiSort?

optional enableMultiSort?: boolean;

Defined in: features/row-sorting/rowSortingFeature.types.ts:125

Enables/Disables multi-sorting for this column.


enableSorting?

optional enableSorting?: boolean;

Defined in: features/row-sorting/rowSortingFeature.types.ts:129

Enables/Disables sorting for this column.


invertSorting?

optional invertSorting?: boolean;

Defined in: features/row-sorting/rowSortingFeature.types.ts:133

Inverts the order of the sorting for this column. This is useful for values that have an inverted best/worst scale where lower numbers are better, e.g. a ranking (1st, 2nd, 3rd) or golf-like scoring


sortDescFirst?

optional sortDescFirst?: boolean;

Defined in: features/row-sorting/rowSortingFeature.types.ts:137

Set to true for sorting toggles on this column to start in the descending direction.


sortFn?

optional sortFn?: SortFnOption<TFeatures, TData>;

Defined in: features/row-sorting/rowSortingFeature.types.ts:143

The sorting function to use with this column.

  • A string referencing a built-in sorting function
  • A custom sorting function

sortUndefined?

optional sortUndefined?: false | 1 | -1 | "first" | "last";

Defined in: features/row-sorting/rowSortingFeature.types.ts:157

The priority of undefined values when sorting this column.

  • false
    • Undefined values will be passed to the sorting function like any other value with no special handling; the sorting function is responsible for handling them
  • -1
    • Undefined values will be sorted with higher priority (ascending) (if ascending, undefined will appear on the beginning of the list)
  • 1
    • Undefined values will be sorted with lower priority (descending) (if ascending, undefined will appear on the end of the list)
  • 'first'
    • Undefined values will be pushed to the beginning of the list regardless of sort direction
  • 'last'
    • Undefined values will be pushed to the end of the list regardless of sort direction