-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b1e6b79
commit 342069c
Showing
478 changed files
with
45,947 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
docs/framework/react/reference/functions/createtablehelper.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
36
docs/framework/react/reference/type-aliases/tablehelper.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Oops, something went wrong.