Skip to content

Commit

Permalink
generate reference docs
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinVandy committed Jul 28, 2024
1 parent b1e6b79 commit 342069c
Show file tree
Hide file tree
Showing 478 changed files with 45,947 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
uses: tanstack/config/.github/setup@main
- name: Fix formatting
run: pnpm prettier:write
- name: Fix linting
run: pnpm lint:fix
- name: Regenerate docs
run: pnpm docs:generate
- name: Apply fixes
uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a
with:
Expand Down
28 changes: 28 additions & 0 deletions docs/framework/react/reference/functions/createtablehelper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
id: createTableHelper
title: createTableHelper
---

# Function: createTableHelper()

```ts
function createTableHelper<TFeatures, TData>(tableHelperOptions): TableHelper<TFeatures, TData>
```

## Type Parameters

**TFeatures** *extends* `TableFeatures`

**TData** *extends* `unknown`

## Parameters

**tableHelperOptions**: `TableHelperOptions`\<`TFeatures`, `TData`\>

## Returns

[`TableHelper`](../type-aliases/tablehelper.md)\<`TFeatures`, `TData`\>

## Defined in

[react-table/src/tableHelper.ts:24](https://github.com/TanStack/table/blob/b1e6b79157b0debc7222660572b06c8b857f4605/packages/react-table/src/tableHelper.ts#L24)
36 changes: 36 additions & 0 deletions docs/framework/react/reference/functions/flexrender-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
id: flexRender
title: flexRender
---

# Function: flexRender()

```ts
function flexRender<TProps>(Comp, props): React.ReactNode | JSX.Element
```

If rendering headers, cells, or footers with custom markup, use flexRender instead of `cell.getValue()` or `cell.renderValue()`.

## Type Parameters

**TProps** *extends* `object`

## Parameters

**Comp**: [`Renderable`](../type-aliases/renderable.md)\<`TProps`\>

**props**: `TProps`

## Returns

`React.ReactNode` \| `JSX.Element`

## Example

```ts
flexRender(cell.column.columnDef.cell, cell.getContext())
```

## Defined in

[react-table/src/FlexRender.tsx:37](https://github.com/TanStack/table/blob/b1e6b79157b0debc7222660572b06c8b857f4605/packages/react-table/src/FlexRender.tsx#L37)
38 changes: 38 additions & 0 deletions docs/framework/react/reference/functions/flexrender.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
id: FlexRender
title: FlexRender
---

# Function: FlexRender()

```ts
function FlexRender<TProps>(__namedParameters): ReactNode | Element
```

Component version of `flexRender`. Use this utility component to render headers, cells, or footers with custom markup.

## Type Parameters

**TProps** *extends* `object`

## Parameters

**\_\_namedParameters**

**\_\_namedParameters.Component**: [`Renderable`](../type-aliases/renderable.md)\<`TProps`\>

**\_\_namedParameters.props**: `TProps`

## Returns

`ReactNode` \| `Element`

## Example

```ts
<FlexRender Component={cell.column.columnDef.cell} props={cell.getContext()} />
```

## Defined in

[react-table/src/FlexRender.tsx:52](https://github.com/TanStack/table/blob/b1e6b79157b0debc7222660572b06c8b857f4605/packages/react-table/src/FlexRender.tsx#L52)
36 changes: 36 additions & 0 deletions docs/framework/react/reference/functions/usetable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
id: useTable
title: useTable
---

# Function: useTable()

```ts
function useTable<TFeatures, TData>(tableOptions): Table<TFeatures, TData>
```

Will re-render the table whenever the state or options change. Works just like the `useReactTable` from v8.

## Type Parameters

**TFeatures** *extends* `TableFeatures`

**TData** *extends* `unknown`

## Parameters

**tableOptions**

## Returns

`Table`\<`TFeatures`, `TData`\>

## Example

```ts
const table = useTable({ columns, data, state, ...options })
```

## Defined in

[react-table/src/useTable.ts:32](https://github.com/TanStack/table/blob/b1e6b79157b0debc7222660572b06c8b857f4605/packages/react-table/src/useTable.ts#L32)
18 changes: 18 additions & 0 deletions docs/framework/react/reference/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
id: "@tanstack/react-table"
title: "@tanstack/react-table"
---

# @tanstack/react-table

## Type Aliases

- [Renderable](type-aliases/renderable.md)
- [TableHelper](type-aliases/tablehelper.md)

## Functions

- [FlexRender](functions/flexrender.md)
- [createTableHelper](functions/createtablehelper.md)
- [flexRender](functions/flexrender-1.md)
- [useTable](functions/usetable.md)
18 changes: 18 additions & 0 deletions docs/framework/react/reference/type-aliases/renderable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
id: Renderable
title: Renderable
---

# Type Alias: Renderable\<TProps\>

```ts
type Renderable<TProps>: React.ReactNode | React.ComponentType<TProps>;
```

## Type Parameters

**TProps**

## Defined in

[react-table/src/FlexRender.tsx:3](https://github.com/TanStack/table/blob/b1e6b79157b0debc7222660572b06c8b857f4605/packages/react-table/src/FlexRender.tsx#L3)
36 changes: 36 additions & 0 deletions docs/framework/react/reference/type-aliases/tablehelper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
id: TableHelper
title: TableHelper
---

# Type Alias: TableHelper\<TFeatures, TData\>

```ts
type TableHelper<TFeatures, TData>: Omit<TableHelper_Core<TFeatures, TData>, "tableCreator"> & object;
```

## Type declaration

### useTable()

```ts
useTable: (tableOptions) => Table<TFeatures, TData>;
```

#### Parameters

**tableOptions**: `Omit`\<`TableOptions`\<`TFeatures`, `TData`\>, `"_features"` \| `"_rowModels"`\>

#### Returns

`Table`\<`TFeatures`, `TData`\>

## Type Parameters

**TFeatures** *extends* `TableFeatures`

**TData** *extends* `RowData`

## Defined in

[react-table/src/tableHelper.ts:12](https://github.com/TanStack/table/blob/b1e6b79157b0debc7222660572b06c8b857f4605/packages/react-table/src/tableHelper.ts#L12)
40 changes: 40 additions & 0 deletions docs/reference/functions/buildheadergroups.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
id: buildHeaderGroups
title: buildHeaderGroups
---

# Function: buildHeaderGroups()

```ts
function buildHeaderGroups<TFeatures, TData, TValue>(
allColumns,
columnsToGroup,
table,
headerFamily?): HeaderGroup<TFeatures, TData>[]
```

## Type Parameters

**TFeatures** *extends* [`TableFeatures`](../interfaces/tablefeatures.md)

**TData** *extends* `unknown`

**TValue** *extends* `unknown` = `unknown`

## Parameters

**allColumns**: [`Column`](../type-aliases/column.md)\<`TFeatures`, `TData`, `TValue`\>[]

**columnsToGroup**: [`Column`](../type-aliases/column.md)\<`TFeatures`, `TData`, `TValue`\>[]

**table**: [`Table`](../type-aliases/table.md)\<`TFeatures`, `TData`\>

**headerFamily?**: `"left"` \| `"right"` \| `"center"`

## Returns

[`HeaderGroup`](../interfaces/headergroup.md)\<`TFeatures`, `TData`\>[]

## Defined in

[core/headers/buildHeaderGroups.ts:10](https://github.com/TanStack/table/blob/b1e6b79157b0debc7222660572b06c8b857f4605/packages/table-core/src/core/headers/buildHeaderGroups.ts#L10)
68 changes: 68 additions & 0 deletions docs/reference/functions/cell_getcontext.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
id: cell_getContext
title: cell_getContext
---

# Function: cell\_getContext()

```ts
function cell_getContext<TFeatures, TData, TValue>(cell, table): object
```

## Type Parameters

**TFeatures** *extends* [`TableFeatures`](../interfaces/tablefeatures.md)

**TData** *extends* `unknown`

**TValue** *extends* `unknown` = `unknown`

## Parameters

**cell**: [`Cell`](../type-aliases/cell.md)\<`TFeatures`, `TData`, `TValue`\>

**table**: [`Table`](../type-aliases/table.md)\<`TFeatures`, `TData`\>

## Returns

`object`

### cell

```ts
cell: Cell<TFeatures, TData, TValue>;
```

### column

```ts
column: Column<TableFeatures, TData, TValue> = cell.column;
```

### getValue

```ts
getValue: Getter<TValue> = cell.getValue;
```

### renderValue

```ts
renderValue: Getter<null | TValue> = cell.renderValue;
```

### row

```ts
row: Row<TableFeatures, TData> = cell.row;
```

### table

```ts
table: Table<TFeatures, TData>;
```

## Defined in

[core/cells/Cells.utils.ts:26](https://github.com/TanStack/table/blob/b1e6b79157b0debc7222660572b06c8b857f4605/packages/table-core/src/core/cells/Cells.utils.ts#L26)
30 changes: 30 additions & 0 deletions docs/reference/functions/cell_getisaggregated.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
id: cell_getIsAggregated
title: cell_getIsAggregated
---

# Function: cell\_getIsAggregated()

```ts
function cell_getIsAggregated<TFeatures, TData, TValue>(cell): boolean
```

## Type Parameters

**TFeatures** *extends* [`TableFeatures`](../interfaces/tablefeatures.md)

**TData** *extends* `unknown`

**TValue** *extends* `unknown` = `unknown`

## Parameters

**cell**: [`Cell`](../type-aliases/cell.md)\<`TFeatures`, `TData`, `TValue`\>

## Returns

`boolean`

## Defined in

[features/column-grouping/ColumnGrouping.utils.ts:199](https://github.com/TanStack/table/blob/b1e6b79157b0debc7222660572b06c8b857f4605/packages/table-core/src/features/column-grouping/ColumnGrouping.utils.ts#L199)
30 changes: 30 additions & 0 deletions docs/reference/functions/cell_getisgrouped.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
id: cell_getIsGrouped
title: cell_getIsGrouped
---

# Function: cell\_getIsGrouped()

```ts
function cell_getIsGrouped<TFeatures, TData, TValue>(cell): boolean
```

## Type Parameters

**TFeatures** *extends* [`TableFeatures`](../interfaces/tablefeatures.md)

**TData** *extends* `unknown`

**TValue** *extends* `unknown` = `unknown`

## Parameters

**cell**: [`Cell`](../type-aliases/cell.md)\<`TFeatures`, `TData`, `TValue`\>

## Returns

`boolean`

## Defined in

[features/column-grouping/ColumnGrouping.utils.ts:181](https://github.com/TanStack/table/blob/b1e6b79157b0debc7222660572b06c8b857f4605/packages/table-core/src/features/column-grouping/ColumnGrouping.utils.ts#L181)
Loading

0 comments on commit 342069c

Please sign in to comment.