本页还没有译文
本页 12 段还没译成Tiếng Việt,下面显示的是英文原文。createColumnHelper
还没翻译译自英文(tanstack.com)本页 12 段都还没译
function createColumnHelper<TFeatures, TData>(): ColumnHelper<TFeatures, TData>;Defined in: helpers/columnHelper.ts:99
Creates helper functions for authoring column definitions with stronger value inference.
accessor infers TValue from an accessor key or accessor function,
display creates non-data columns, group creates parent columns, and
columns preserves tuple-level value types for arrays. At runtime these
helpers only return column definition objects.
Type Parameters
TFeatures
TFeatures extends TableFeatures
TData
TData extends RowData
Returns
ColumnHelper<TFeatures, TData>
Example
const helper = createColumnHelper<typeof features, Person>() // features is the result of `tableFeatures({})` helper
const columns = [
helper.display({ id: 'actions', header: 'Actions' }),
helper.accessor('firstName', {}),
helper.accessor((row) => row.lastName, { id: 'lastName' }),
]AI 翻译查看英文原文