Skip to content

Commit

Permalink
docs: Update column-def.md (#5385)
Browse files Browse the repository at this point in the history
  • Loading branch information
LexBorisoff committed Mar 4, 2024
1 parent 5610ba2 commit c03946d
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions docs/api/core/column-def.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,21 @@ footer?:
}) => unknown)
```

The footer to display for the column. If a function is passed, it will be passed a props object for the header and should return the rendered header value (the exact type depends on the adapter being used).
The footer to display for the column. If a function is passed, it will be passed a props object for the footer and should return the rendered footer value (the exact type depends on the adapter being used).

### `cell`

```tsx
cell?: ((props: {
table: Table<TData>
row: Row<TData>
column: Column<TData>
cell: Cell<TData>
getValue: () => any
renderValue: () => any
}) => unknown)
cell?:
| string
| ((props: {
table: Table<TData>
row: Row<TData>
column: Column<TData>
cell: Cell<TData>
getValue: () => any
renderValue: () => any
}) => unknown)
```

The cell to display each row for the column. If a function is passed, it will be passed a props object for the cell and should return the rendered cell value (the exact type depends on the adapter being used).
Expand All @@ -92,7 +94,7 @@ The cell to display each row for the column. If a function is passed, it will be
meta?: ColumnMeta // This interface is extensible via declaration merging. See below!
```

The meta data to associated with the column. We can access it anywhere when the column is available via `column.columnDef.meta`. This type is global to all tables and can be extended like so:
The meta data to be associated with the column. We can access it anywhere when the column is available via `column.columnDef.meta`. This type is global to all tables and can be extended like so:

```tsx
import '@tanstack/react-table' //or vue, svelte, solid, etc.
Expand Down

0 comments on commit c03946d

Please sign in to comment.