Skip to content

Commit

Permalink
docs: fixed links leading to the 7th version of the React-table packa…
Browse files Browse the repository at this point in the history
…ge (openedx#2955)
  • Loading branch information
PKulkoRaccoonGang authored and Kyrylo Hudym-Levkovych committed Jan 2, 2024
1 parent 2e566c8 commit 3e2b3c7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/DataTable/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ designStatus: 'Done'
devStatus: 'In progress'
---

The DataTable component is a wrapper that uses the <a href="https://react-table.tanstack.com/docs/overview">react-table</a> library to
The DataTable component is a wrapper that uses the <a href="https://github.com/TanStack/table/tree/v7/docs/src/pages/docs" target="_blank" rel="noopener noreferrer">react-table</a> library to
create tables. It can be used as is, or its subcomponents can be used on their own, allowing the developer full control.

Paragon also exports all React hooks from ``react-table`` allowing the developers to use them and make customizations more freely without adding ``react-table`` as a separate dependency to their project.
For full list of available hooks view <a href="https://react-table.tanstack.com/docs/api/overview">react-table API reference</a>.
For full list of available hooks view <a href="https://github.com/TanStack/table/tree/v7/docs/src/pages/docs/api" target="_blank" rel="noopener noreferrer">react-table API reference</a>.

## How children get information

Expand All @@ -49,7 +49,7 @@ const instance = useContext(DataTableContext)
For small tables (less than ~10,000 rows), filtering, sorting and pagination can be done quickly and easily on the frontend.

In this example, a default TextFilter component is used for all columns. A default filter can be passed in,
or a filter component can be defined on the column. See <a href="https://react-table.tanstack.com/docs/api/useFilters">react-table filters documentation</a>
or a filter component can be defined on the column. See <a href="https://github.com/TanStack/table/blob/v7/docs/src/pages/docs/api/useFilters.md" target="_blank" rel="noopener noreferrer">react-table filters documentation</a>
for more information.

```jsx live
Expand Down
2 changes: 1 addition & 1 deletion src/DataTable/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ DataTable.propTypes = {
/** Function that will fetch table data. Called when page size, page index or filters change.
* Meant to be used with manual filters and pagination */
fetchData: PropTypes.func,
/** Initial state passed to react-table's documentation https://react-table.tanstack.com/docs/api/useTable */
/** Initial state passed to react-table's documentation https://github.com/TanStack/table/blob/v7/docs/src/pages/docs/api/useTable.md */
initialState: PropTypes.shape({
pageSize: requiredWhen(PropTypes.number, 'isPaginated'),
pageIndex: requiredWhen(PropTypes.number, 'isPaginated'),
Expand Down
6 changes: 3 additions & 3 deletions src/DataTable/tablefilters.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ devStatus: 'In progress'
---


The ``DataTable`` component is a wrapper that uses the <a href="https://react-table.tanstack.com/docs">react-table</a> library to
The ``DataTable`` component is a wrapper that uses the <a href="https://github.com/TanStack/table/tree/v7/docs/src/pages/docs" target="_blank" rel="noopener noreferrer">react-table</a> library to
create tables. It can be used as is, or its subcomponents can be used on their own, allowing the developer full control.

## Filtering and sorting
Paragon currently provides a variety of filter types, and you can also define your own filter types.

In the example below, a default ``TextFilter`` component is used as the default filter for all columns. A default filter can be passed in,
or a filter component can be defined on the column using the ``Filter`` attribute. See <a href="https://react-table.tanstack.com/docs/api/useFilters">react-table filters documentation</a>
or a filter component can be defined on the column using the ``Filter`` attribute. See <a href="https://github.com/TanStack/table/blob/v7/docs/src/pages/docs/api/useFilters.md" target="_blank" rel="noopener noreferrer">react-table filters documentation</a>
for more information.

## Available filter functions
A filtering function can be defined on the column as well as the filter component. Custom filtering functions can also be defined, see <a href="https://react-table.tanstack.com/docs/api/useFilters#column-options">react-table filters documentation</a>
A filtering function can be defined on the column as well as the filter component. Custom filtering functions can also be defined, see <a href="https://github.com/TanStack/table/blob/v7/docs/src/pages/docs/api/useFilters.md#column-options" target="_blank" rel="noopener noreferrer">react-table filters documentation</a>
for more information.
Filter functions are defined on the column as the ``filter`` attribute.
<dl>
Expand Down

0 comments on commit 3e2b3c7

Please sign in to comment.