Docs
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
Neon
WorkOS
Clerk
Convex
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
Neon
WorkOS
Clerk
Convex
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
Table API Reference
Column API Reference
Row API Reference
Cell API Reference
Header API Reference
Features API Reference
Legacy API Reference
Enterprise
Features API Reference

Column_RowSorting

Interface: Column_RowSorting<TFeatures, TData>

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

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

Properties

clearSorting()

ts
clearSorting: () => void;

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

Removes this column from the table's sorting state

Returns

void


getAutoSortDir()

ts
getAutoSortDir: () => SortDirection;

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

Returns a sort direction automatically inferred based on the columns values.

Returns

SortDirection


getAutoSortFn()

ts
getAutoSortFn: () => SortFn<TFeatures, TData>;

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

Returns a sorting function automatically inferred based on the columns values.

Returns

SortFn<TFeatures, TData>


getCanMultiSort()

ts
getCanMultiSort: () => boolean;

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

Returns whether this column can be multi-sorted.

Returns

boolean


getCanSort()

ts
getCanSort: () => boolean;

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

Returns whether this column can be sorted.

Returns

boolean


getFirstSortDir()

ts
getFirstSortDir: () => SortDirection;

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

Returns the first direction that should be used when sorting this column.

Returns

SortDirection


getIsSorted()

ts
getIsSorted: () => false | SortDirection;

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

Returns the current sort direction of this column.

Returns

false | SortDirection


getNextSortingOrder()

ts
getNextSortingOrder: () => false | SortDirection;

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

Returns the next sorting order.

Returns

false | SortDirection


getSortFn()

ts
getSortFn: () => SortFn<TFeatures, TData>;

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

Returns the resolved sorting function to be used for this column

Returns

SortFn<TFeatures, TData>


getSortIndex()

ts
getSortIndex: () => number;

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

Returns the index position of this column's sorting within the sorting state

Returns

number


getToggleSortingHandler()

ts
getToggleSortingHandler: () => (event) => void | undefined;

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

Returns a function that can be used to toggle this column's sorting state. This is useful for attaching a click handler to the column header.

Returns

(event) => void | undefined


toggleSorting()

ts
toggleSorting: (desc?, isMulti?) => void;

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

Toggles this columns sorting state. If desc is provided, it will force the sort direction to that value. If isMulti is provided, it will additivity multi-sort the column (or toggle it if it is already sorted).

Parameters

desc?

boolean

isMulti?

boolean

Returns

void