本页还没有译文
本页 17 段还没译成Português (BR),下面显示的是英文原文。useLegacyTable
还没翻译译自英文(tanstack.com)本页 17 段都还没译
function useLegacyTable<TData>(options): LegacyReactTable<TData>;Defined in: src/useLegacyTable.ts:405
Type Parameters
TData
TData extends RowData
Parameters
options
LegacyTableOptions<TData>
Legacy v8-style table options
Returns
LegacyReactTable<TData>
A table instance with the full state subscribed and a getState() method
Deprecated
This hook is provided as a compatibility layer for migrating from TanStack Table v8.
Use the new useTable hook instead with an explicit features option:
// New v9 API
const features = tableFeatures({
columnFilteringFeature,
rowSortingFeature,
rowPaginationFeature,
filteredRowModel: createFilteredRowModel(),
sortedRowModel: createSortedRowModel(),
paginatedRowModel: createPaginatedRowModel(),
filterFns,
sortFns,
})
const table = useTable({
features,
columns,
data,
})Key differences from v8:
- Features are tree-shakeable - only import what you use
- Row models and fn registries are explicitly passed on the
featuresoption - Use
table.Subscribefor fine-grained re-renders - State is accessed via
table.stateafter selecting with the 2nd argument
AI 翻译查看英文原文