Skip to content

Commit

Permalink
feat: reexport tanstack (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
YudjinSud authored Nov 6, 2024
1 parent 6e959c5 commit e458d63
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ npm install --save @gravity-ui/table
```tsx
import React from 'react';
import {Table, useTable} from '@gravity-ui/table';
import type {ColumnDef} from '@tanstack/react-table';
import type {ColumnDef} from '@gravity-ui/table/tanstack';

interface Person {
id: string;
Expand Down Expand Up @@ -50,7 +50,7 @@ There are two Table components that you can use:

```tsx
import {selectionColumn} from '@gravity-ui/table';
import type {RowSelectionState} from '@tanstack/react-table';
import type {RowSelectionState} from '@gravity-ui/table/tanstack';

const columns: ColumnDef<Person>[] = [
selectionColumn as ColumnDef<Person>,
Expand Down Expand Up @@ -84,7 +84,7 @@ const RowSelectionExample = () => {
Learn about the column properties in the react-table [docs](https://tanstack.com/table/v8/docs/guide/sorting)

```tsx
import type {SortingState} from '@tanstack/react-table';
import type {SortingState} from '@gravity-ui/table/tanstack';

const columns: ColumnDef<Person>[] = [
/* ... */
Expand Down Expand Up @@ -124,7 +124,7 @@ const table = useTable({
### Grouping

```tsx
import type {ExpandedState, Row} from '@tanstack/react-table';
import type {ExpandedState, Row} from '@gravity-ui/table/tanstack';

interface Person {
id: string;
Expand Down
1 change: 1 addition & 0 deletions src/tanstack-virtual.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '@tanstack/react-virtual';
1 change: 1 addition & 0 deletions src/tanstack.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '@tanstack/react-table';

0 comments on commit e458d63

Please sign in to comment.