Skip to content

Commit 20a1e0b

Browse files
authored
docs(AnalyticalTable): update react-table v7 links (#4651)
1 parent 450304a commit 20a1e0b

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

packages/main/src/components/AnalyticalTable/Recipes.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import { MessageStrip } from '../../webComponents/index';
1111

1212
## How to add your own plugin hooks?
1313

14-
The `AnalyticalTable` internally uses all plugin hooks of the [react-table](https://github.com/tannerlinsley/react-table) except for `usePagination` and hooks that change the layout.
14+
The `AnalyticalTable` internally uses all plugin hooks of the [react-table v7](https://github.com/TanStack/table/blob/v7/docs/src/pages/docs/api/overview.md) except for `usePagination` and hooks that change the layout.
1515
If you pass a `react-table` hook to the `tableHooks` prop of the `AnalyticalTable` you will most likely experience some side effects or even break the table completely. We therefore strongly recommend to just not do it ;).
16-
If you encounter a functionality that should be available with `react-table` hooks, but isn't in the `AnalyticalTable` please open an issue in github or write us in Slack.
16+
If you encounter a functionality that should be available with `react-table` hooks, but isn't in the `AnalyticalTable` please open an issue in GitHub.
1717

1818
<MessageStrip
1919
type="Warning"
@@ -36,7 +36,7 @@ export const TableWithCustomHook = (props) => {
3636
```
3737

3838
With the `customHook` callback you can plugin in all available hooks. Please note that some hooks need a return value (e.g. `columns`) which is then always the first parameter of the function, and others are not allowed to return a value (e.g. `useTable`).
39-
For further details please refer to the [`react-table` documentation](https://react-table-v7.tanstack.com/docs/api/overview).
39+
For further details please refer to the [`react-table` v7 documentation](https://github.com/TanStack/table/blob/v7/docs/src/pages/docs/api/overview.md).
4040

4141
## How to select rows containing active elements?
4242

@@ -88,7 +88,7 @@ React.useEffect(() => {
8888
/>
8989
```
9090

91-
For more details on this behavior you can double check the [react-table docs](https://react-table-v7.tanstack.com/docs/faq#how-do-i-stop-my-table-state-from-automatically-resetting-when-my-data-changes).
91+
For more details on this behavior you can double check the [react-table v7 docs](https://github.com/TanStack/table/blob/v7/docs/src/pages/docs/faq.md#how-do-i-stop-my-table-state-from-automatically-resetting-when-my-data-changes).
9292

9393
## How to scroll to a specific row/offset?
9494

@@ -117,7 +117,7 @@ If you wish to implement your own data manipulation outside the table you can us
117117
/>
118118
```
119119

120-
For more information please take a look at the [React Table v7 docs](https://react-table-v7.tanstack.com/docs/api/overview).
120+
For more information please take a look at the [React Table v7 docs](https://github.com/TanStack/table/blob/v7/docs/src/pages/docs/api/overview.md).
121121

122122
## How to distinguish between `onRowClick` and `onRowSelect` on selection-cell click?
123123

@@ -138,7 +138,7 @@ const onRowSelect = (e) => {
138138

139139
## How to hide columns?
140140

141-
[React Table v7](https://react-table-v7.tanstack.com/docs/api/useTable) exposes an API on the table instance to hide columns. You can leverage it for example by attaching a React Ref to the `tableInstance` prop.
141+
[React Table v7](https://github.com/TanStack/table/blob/v7/docs/src/pages/docs/api/useTable.md) exposes an API on the table instance to hide columns. You can leverage it for example by attaching a React Ref to the `tableInstance` prop.
142142
Please note that the internal react-table is resetting its hidden state after hiding the column, which is most probably a bug. To prevent this you can set the `autoResetHiddenColumns` table option to `false`. (See [here](https://sap.github.io/ui5-webcomponents-react/?path=/docs/data-display-analyticaltable--default-story#how-to-stop-the-table-state-from-automatically-resetting-when-the-data-changes))
143143

144144
```jsx

packages/main/src/components/AnalyticalTable/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ export interface AnalyticalTableColumnDefinition {
253253
*/
254254
enableMultiSort?: boolean;
255255

256-
// all other custom properties of [React Table](https://react-table-v7.tanstack.com/) column options
256+
// all other custom properties of [React Table v7](https://github.com/TanStack/table/blob/v7/docs/src/pages/docs/api/overview.md) column options
257257
[key: string]: any;
258258
}
259259

@@ -448,11 +448,11 @@ export interface AnalyticalTablePropTypes extends Omit<CommonProps, 'title'> {
448448
/**
449449
* Defines the value that should be filtered on across all rows.
450450
*
451-
* __Note:__ This prop is not supported for tree-tables. You can enable it by creating your own global-filter function. You can find out more about this in the [react-table v7 documentation](https://react-table-v7.tanstack.com/docs/api/useGlobalFilter).
451+
* __Note:__ This prop is not supported for tree-tables. You can enable it by creating your own global-filter function. You can find out more about this in the [react-table v7 documentation](https://github.com/TanStack/table/blob/v7/docs/src/pages/docs/api/useGlobalFilter.md).
452452
*/
453453
globalFilterValue?: string;
454454
/**
455-
* Additional options which will be passed to [react-table´s useTable hook](https://react-table-v7.tanstack.com/docs/api/useTable#table-options)
455+
* Additional options which will be passed to [v7 react-table´s useTable hook](https://github.com/TanStack/table/blob/v7/docs/src/pages/docs/api/useTable.md#table-options)
456456
*/
457457
reactTableOptions?: Record<string, unknown>;
458458
/**
@@ -564,7 +564,7 @@ export interface AnalyticalTablePropTypes extends Omit<CommonProps, 'title'> {
564564

565565
/**
566566
* Exposes the internal table instance.
567-
* This object will contain all [instance properties](https://react-table-v7.tanstack.com/docs/api/useTable#instance-properties)
567+
* This object will contain all [instance properties (react-table v7)](https://github.com/TanStack/table/blob/v7/docs/src/pages/docs/api/useTable.md#instance-properties)
568568
* of the `useTable` hook and all instance properties from `useColumnOrder`, `useExpanded`, `useFilters`,
569569
* `useGlobalFilter`, `useGroupBy`,`useResizeColumns`, `useRowSelect` and `useSortBy` plugin hooks.
570570
*

0 commit comments

Comments
 (0)