# getSortedRowModel

# ~~Function: getSortedRowModel()~~

```ts
function getSortedRowModel<TData>(): RowModelFactory<TData>;
```

Defined in: [useLegacyTable.ts:65](https://github.com/TanStack/table/blob/main/packages/react-table/src/useLegacyTable.ts#L65)

## Type Parameters

### TData

`TData` *extends* `RowData`

## Returns

[`RowModelFactory`](../type-aliases/RowModelFactory.md)\<`TData`\>

## Deprecated

Use `createSortedRowModel(sortFns)` with the new `useTable` hook instead.

This is a stub function for v8 API compatibility with `useLegacyTable`.
It acts as a marker to enable the sorted row model.
